program stairway;var N : integer; B : int64;begin readln(N); B:=N*(N+1) div 2; writeln(B);end.
987
487578
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!