CSES - Datatähti Open 2019 - Sum
  • Time limit: 1.00 s
  • Memory limit: 512 MB
Your task is to calculate the number of ways an integer $n$ can be represented as a sum of three distinct positive integers.

For example, if $n=9$, there are $3$ solutions:
  • $1+2+6=9$
  • $1+3+5=9$
  • $2+3+4=9$
Input

The only input line has an integer $n$.

Output

Print one line: the number of solutions.

Example

Input:
9

Output:
3

Grading

In each test $1 \le n \le 1000$. You will get $100$ points for the task if your program gives the correct answer in each test.