Problem2641--CF546 - A. Soldier and Bananas

2641: CF546 - A. Soldier and Bananas

[Creator : ]
Time Limit : 2.000 sec  Memory Limit : 256 MiB

Description

A soldier wants to buywbananas in the shop. He has to paykdollars for the first banana,2kdollars for the second one and so on (in other words, he has to payi·kdollars for thei-th banana).
He has $n$ dollars. How many dollars does he have to borrow from his friend soldier to buywbananas?

Input

The first line contains three positive integers $k,n,w\ (1≤k,w≤1000, 0≤n≤10^9)$, the cost of the first banana, initial number of dollars the soldier has and number of bananas he wants.

Output

Output one integer − the amount of dollars that the soldier must borrow from his friend. If he doesn't have to borrow money, output $0$.

Sample 1 Input

3 17 4

Sample 1 Output

13

HINT

题目来源:CF546

Source/Category