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

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

Sum of even numbers

Easy 1000 ms 64 MB 24%
Share

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

$$S = 2 + 4 + 6 + \dots$$

If there are no even numbers ($N = 1$), $S = 0$.

The sum of consecutive even numbers

Input

One positive integer $N$.

Output

One integer — $S$.

Note

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

Examples

Input #1
6
Output #1
12
Input #2
10
Output #2
30

Sign in to submit a solution

Signing up is free and takes a minute.