Sticks box

The box contains NN sticks, which need to be divided between friends Renato, Gustavo and Bruno, for a school job. Each friend must earn at least 1 (one) toothpick. The teacher will determine the maximum number of MM sticks that each one can earn.

In this task, given NN and MM, your program must calculate how many different ways there are to divide all NN sticks among the three friends. For example, for N=100N = 100; if M=15M = 15, then there are zero ways of dividing because the sum of the numbers of Renato, Gustavo and Bruno's toothpicks would be at most 45, only it must always be NN; but if M=34M = 34, then there would be six different ways:

Input

The entry consists of only one line with two natural numbers NN and MM, indicating respectively the number of sticks in the box and the maximum amount that each friend can win.

Figure 1

Output

Your program should write a single line in the output, containing a single integer: how many different ways are there to divide NN sticks among the three friends.

Constraints

  • 3N1000003 \leq N \leq 100000
  • 1MN1 \leq M \leq N
Input Samples Output Samples
100 15
0
100000 98765
4997567718
Translated by Luis Paulo