program prob
    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)
    end do
    ans = ans - n
    write(*,*) ans

    stop
contains
end program prob