#PCBSAU0000011. Số cái bắt tay (Handshake Count)

Số cái bắt tay (Handshake Count)

Handshake Count

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given nn people, every unordered pair of distinct people shakes hands exactly once. Count the total handshakes.

Input

One line containing integer nn.

Output

Print the number of unordered pairs of distinct people.

Subtask

  • Subtask 1 — 100 points: 0≤n≤1090\le n\le10^9.

Example

Input

4

Output

6

Explanation

For n=4n=4, each of the six unordered pairs shakes hands once. The formula 4(4−1)/2=64(4-1)/2=6 gives the output 6.