n = gets.to_i sum = 0 n.times do |i| sum += i + 1 end puts sum