def total n = get.to_i i = 0 x = 0 while i <= n do i += 1 x += i end puts i end total