A soldier wants to buy *w* bananas in the shop. He has to pay *k* dollars for the first banana, 2*k* dollars for the second one and so on (in other words, he has to pay *i*·*k* dollars for the *i*-th banana). 

He has *n* dollars. How many dollars does he have to borrow from his friend soldier to buy *w* bananas?
The first line contains three positive integers *k*, *n*, *w* (1  ≤  *k*, *w*  ≤  1000, 0 ≤ *n* ≤ 10<sup class="upper-index">9</sup>), the cost of the first banana, initial number of dollars the soldier has and number of bananas he wants.
#include <bits/stdc++.h>
using namespace std ;
typedef unsigned long long ll;
typedef pair<int, int> pii;
#define ll long long int
#define pb push_back
#define F first
#define S second
#define f(i, a, b)  for(int i = a; i < b; i++)
#define lp(i  , j , n) for (int i = j; i <= n; i++)
#define all(a)  a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(x) (int)(x).size()
#define mp(x, y) make_pair(x,y)
const int pi=3.14159265359;
const int MAXN=1e6 + 5;
const int MOD = 998244353;
void sol(){
   ll k,n,w;
   cin>>k>>n>>w;
   ll s=0;
  if(k*(w)*(w+1)/2>n)
    cout<<k*(w)*(w+1)/2-n;
  else
    cout<<0;
}
void BIA(){
 ios_base::sync_with_stdio(0) , cin.tie(0) , cout.tie(0);}
int32_t main(){
	BIA();
	int t=1;//	cin >> t;
	while(t--){
	sol();
	}
}