← Problem book: Python Lesson 34 of 96 · 10 XP

Sum from 1 to N

Theory and problem statement

Machine translation, not yet reviewed by a native speaker.

You are given n (n ≥ 1). Print the sum 1 + 2 + … + n, computed in a loop.

Example

Input:

5

Output:

15

Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.