n = gets.to_i a = 0 for i in 1..n a += i end puts a