Consider a set S of n vertical segments in the plane (each segment includes its two endpoints). No two segments of S have a point in common.
Two segments see each other if there is a horizontal segment that joins them and has no point in common with any other segment of S.
The figure below shows an example set of segments. The pairs of segments that see each other are 1-2, 1-3, 2-3, 1-5, and 4-5. Segments 1 and 4 do not see each other.

Among all sets of exactly n pairwise disjoint vertical segments, we look for the largest possible number of pairs of segments that see each other. Given n, compute this maximum number of visible pairs.
The only line of input contains one integer n (1≤n≤20000).
Print one integer: the maximum possible number of pairs of segments that can see each other, taken over all sets of n pairwise disjoint vertical segments.
