allocatable :: x(:) read(*,*) n allocate (x(n)) read(*,*) (x(m),m=1,n) A=0 do m=1,n A=A+x(m) end do write(*,*) A end