program ABC103C
    implicit none
    integer(8)::i,N
    integer(8)::result=0
    integer(8),allocatable,dimension(:)::A
    read(5,*)N
    allocate(A(N))
    read(5,*)(A(i),i=1,N)

    do i=1,N
        result=result+A(i)-1
    end do

    print'(i0)',result
    
end program ABC103C