Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/toq-sonlar-yigindisi

Sum of odd numbers

Easy 1000 ms 64 MB 24%
Share

A positive integer $N$ is given. Compute the sum of all odd numbers from $1$ to $N$:

$$S = 1 + 3 + 5 + \dots$$

The sum of consecutive odd numbers

Input

One positive integer $N$.

Output

One integer — the sum of the odd numbers.

Note

$1 \le N \le 10^{5}$

Examples

Input #1
5
Output #1
9
Input #2
10
Output #2
25

Sign in to submit a solution

Signing up is free and takes a minute.