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 nn can be represented as a sum of three distinct positive integers.

For example, if n=9n=9, there are 33 solutions:

  • 1+2+6=91+2+6=9
  • 1+3+5=91+3+5=9
  • 2+3+4=92+3+4=9

Input

The only input line has an integer nn.

Output

Print one line: the number of solutions.

Example

Input:

9

Output:

3

Grading

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