Sum 1 to N

EasyGrade 10

Read an integer n and print the sum of every whole number from 1 to n (inclusive).

Input / Output

Input: a single positive integer n. Output: the sum 1 + 2 + ... + n.

Examples

Input

5

Expected Output

15

Input

10

Expected Output

55

+ 2 hidden tests checked on Submit.

Files

Main.java is the entry point. Add extra classes for OOP exercises — they compile together.

Main.java
Loading...

Run your code to see test results here.