We’re preparing your current view and syncing the latest data.
Given n points on the circumference of a circle, each pair of points forms exactly one chord. Calculate the total number of chords formed.
Input consists of a single integer n (2 ≤ n ≤ 1000) — the number of points on the circumference.
Output a single integer — the number of chords.
2 ≤ n ≤ 1000
Example 1
Input
3
Output
3
Explanation
Three points on the circumference form exactly three chords: between each pair.