program main implicit none integer::N integer*8,allocatable::A(:) read *,N allocate(A(N)) read *,A print '(i0)',SUM(A) end program main