#CCBCHBA0000104. Đếm cặp tăng nghiêm (Count Strictly Increasing Pairs)

Đếm cặp tăng nghiêm (Count Strictly Increasing Pairs)

Count Strictly Increasing Pairs

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given a nonnegative integer nn, count integer pairs (i,j)(i,j) satisfying 1≤i<j≤n1\le i<j\le n. The answer is zero when nn is 0 or 1.

Input

One line contains integer nn.

Output

Print one integer.

Subtasks

  • Subtask 1 (20%): 0≤n≤200\le n\le 20.

  • Subtask 2 (30%): 0≤n≤2000\le n\le 200.

  • Subtask 3 (50%): 0≤n≤10000\le n\le 1000.

Examples

Example 1

Input:

4

Output:

6

Explanation:

There are 4 candidates, so the number of i<j pairs is 4×(4-1)/2 = 6.

Example 2

Input:

0

Output:

0

Explanation:

There are 0 candidates, so the number of i<j pairs is 0×(0-1)/2 = 0.