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