program mod 
  implicit none
  integer(8) :: n, ans, i
  integer(8), allocatable :: a(:) 

  read *, n 
  allocate(a(n))
  read *, a 
  ans = 0
  do i = 1, n 
    ans = ans + a(i) - 1
  end do
  print '(i0)', ans
  stop
end program mod
