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