#D3779. Sum Difference

    ID: 3136 Type: Default 2000ms 1073MiB

Sum Difference

Sum Difference

We have an integer sequence A of length N, where A_1 = X, A_{i+1} = A_i + D (1 \leq i < N ) holds.

Takahashi will take some (possibly all or none) of the elements in this sequence, and Aoki will take all of the others.

Let S and T be the sum of the numbers taken by Takahashi and Aoki, respectively. How many possible values of S - T are there?

Constraints

  • -10^8 \leq X, D \leq 10^8
  • 1 \leq N \leq 2 \times 10^5
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

N X D

Output

Print the number of possible values of S - T.

Examples

Input

3 4 2

Output

8

Input

2 3 -3

Output

2

Input

100 14 20

Output

49805

inputFormat

input are integers.

Input

Input is given from Standard Input in the following format:

N X D

outputFormat

Output

Print the number of possible values of S - T.

Examples

Input

3 4 2

Output

8

Input

2 3 -3

Output

2

Input

100 14 20

Output

49805

样例

2 3 -3
2