LearnPy Hub
← Loops problems
Easy

Sum of Odd Numbers

Read n and print the sum of all odd numbers from 1 to n using a for loop.

Input

One integer n ≥ 1.

Output

One integer.

Sample 1

Input
10
Output
25

Sample 2

Input
1
Output
1
solution.py
Output appears here
Sum of Odd Numbers · Python practice problem · LearnPy Hub