N = gets.to_i sum = 0 for i in 1..N sum += i end puts sum