program answer
  implicit none

  integer(8) :: N, i, ans
  integer(8), allocatable :: a(:)

  read(*,*) N
  allocate(a(N))
  read(*,*) a

  write(*,*) sum(a)-N
  deallocate(a)
  stop
 end program answer7