Vera's Fashion

Given N tops and N bottoms colored 1 to N, count how many top and bottom pairs have different colors.

Easy1MathCombinatoricsImplementationInterviewNo attempts yetTime limit2sMemory limit256 MB

Problem

Vera owns NN tops and NN bottoms. The ii-th top and the ii-th bottom both have color ii. The NN colors are all different.

Vera picks one top and one bottom. How many such pairs have a top and a bottom of different colors?

Input

The input is given in the following form.

N

Output

Print the number of pairs whose top and bottom have different colors, on one line.

Constraints

  • 1N20171 \le N \le 2017
  • NN is an integer.