n = io.read("*n") total = 0 for i=1,n do total = total + i end print(total)