program main implicit none integer :: N read *, N print *, N * (N+1) / 2 end program main