A soldier wants to buy w bananas in the shop. He has to pay k dollars for the first banana, 2k 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?


-----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.


-----Examples-----
Input
3 17 4

Output
13

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Implementation

Complete search


Solutions:
(a, b, c) = map(int, input().split())
cost = 0
for i in range(1, c + 1):
	cost += i * a
if b < cost:
	print(cost - b)
else:
	print('0')


a = input().split(' ')
lol = int(a[0])
oof = int(a[1])
ugh = int(a[2])
fjbbbb = 0
for i in range(0, ugh + 1):
	fjbbbb += lol * i
if fjbbbb - oof >= 0:
	print(fjbbbb - oof)
else:
	print(0)


x = input().split()
y = int(x[2])
res = []
while y != 0:
	a = int(x[0]) * y
	res.append(a)
	y = y - 1
b = sum(res)
d = b - int(x[1])
if d > 0:
	print(d)
else:
	print('0')


(k, n, w) = map(int, input().split())
s = 0
for i in range(1, w + 1):
	s = s + k * i
d = s - n
if d <= 0:
	print(0)
else:
	print(d)


a = list(map(int, input().split()))
m = a[0] * a[2] * (a[2] + 1) / 2
if m >= a[1]:
	print(int(m - a[1]))
else:
	print(0)


(k, n, w) = map(int, input().split(' '))
sum = w * (w + 1) / 2
sum = sum * k
diff = int(sum - n)
if diff >= 0:
	print(diff)
else:
	print('0')


A = [int(x) for x in input().split()]
T = (A[2] + 1) * A[0] * A[2] / 2 - A[1]
if T > 0:
	print(int(T))
else:
	print('0')


(k, n, w) = [int(x) for x in input().split()]
c = 0
while w > c:
	suma = 0
	for i in range(1, w + 1):
		suma += i
	c += 1
rpta = k * suma
if rpta > n:
	print(rpta - n)
else:
	print(0)


(k, w, n) = [int(j) for j in input().split()]
val = 0
for i in range(1, n + 1):
	val += i * k
if w >= val:
	print('0')
else:
	bow = val - w
	print(bow)


(k, d, n) = map(int, input().split())
i = 1
sum = 0
while i <= n:
	sum = sum + k * i
	i = i + 1
if sum <= d:
	print(0)
else:
	print(sum - d)


(k, n, w) = map(int, input().split())
cost = k
for number in range(2, w + 1):
	cost += number * k
print(max(0, cost - n))


(k, n, w) = map(int, input().split())
k1 = 1
sum = 0
while w != 0:
	sum = sum + k1 * k
	w = w - 1
	k1 = k1 + 1
if sum < n:
	print(0)
else:
	print(abs(sum - n))


(n, k, w) = map(int, input().split())
print(int(max(n * (1 + w) * w / 2 - k, 0)))


(k, n, w) = [int(i) for i in input().split()]
cost = k * (1 + w) * w // 2
print(cost - n if cost > n else 0)


(k, n, w) = map(int, input().split())
a = k * w * (w + 1) / 2
if a <= n:
	print(0)
else:
	print(int(a - n))


(k, n, w) = map(int, input().split())
m = 0
for x in range(1, w + 1):
	m += k * x
if m > n:
	print(m - n)
else:
	print(0)


(k, n, w) = map(int, input().split())
sum = 0
for i in range(1, w + 1):
	sum += i * k
if sum <= n:
	print(0)
else:
	print(sum - n)


a = input()
a = a.split(' ')
a = map(int, a)
a = list(a)
s = 0
for i in range(1, a[2] + 1):
	s = s + i * a[0]
if a[1] < s:
	print(s - a[1])
else:
	print(0)


(k, n, w) = input().split(maxsplit=3)
k = int(k)
n = int(n)
w = int(w)
toPay = 0
for i in range(1, w + 1):
	toPay += i * k
if toPay <= n:
	print(0)
else:
	print(toPay - n)


inputSpl = input().split(' ')
costFirstBanana = int(inputSpl[0])
soldierDolars = int(inputSpl[1])
nBananasHeWants = int(inputSpl[2])
totalPrice = costFirstBanana * (nBananasHeWants * (nBananasHeWants + 1) / 2)
print(int(totalPrice - soldierDolars) if soldierDolars < totalPrice else 0)


(k, n, w) = list(map(int, input().split()))
count = 0
for i in range(1, w + 1):
	count = count + i * k
if count - n < 0:
	print('0')
else:
	print(count - n)


(k, n, w) = map(int, input().split())
i = 1
while w != 0:
	n = n - k * i
	i += 1
	w -= 1
if n >= 0:
	print(0)
else:
	print(abs(n))


(k, n, w) = tuple(map(int, input().split(' ')))
s = k * w * (w + 1) // 2
if n >= s:
	print(0)
else:
	print(s - n)


str = input()
values = str.split(' ')
k = int(values[0])
n = int(values[1])
w = int(values[2])
sum = 0
for i in range(1, w + 1):
	sum += k * i
if sum - n >= 0:
	print(sum - n)
else:
	print(0)


x = input().split()
a = -int(x[1]) + int(int(x[2]) * (int(x[2]) + 1) / 2 * int(x[0]))
if a > 0:
	print(a)
else:
	print('0')


(k, n, w) = map(int, input().split())
(a, b) = (0, 0)
for i in range(1, w + 1):
	a = i * k
	b += a
if n > b:
	print(0)
else:
	print(b - n)


n = [int(s) for s in input().split()]
total = 0
for index in range(1, n[2] + 1):
	total += n[0] * index
print(total - n[1] if total - n[1] > 0 else 0)


(i, m, n) = input().split()
i = int(i)
m = int(m)
n = int(n)
price = 0
for j in range(1, n + 1):
	price = price + j * i
if price > m:
	print(price - m)
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
s = 0
for i in range(1, w + 1):
	s = s + i * k
if s > n:
	print(s - n)
if s <= n:
	print(0)


(a, b, c) = map(int, input().split())
total = 0
i = 1
while i <= c:
	total += a * i
	i += 1
if total - b >= 0:
	print(total - b)
else:
	print(0)


(k, n, w) = list(map(int, input().split(' ')))
need = 0
need = (1 + w) * w // 2 * k
if need < n:
	print(0)
else:
	print(need - n)


(f, d, b) = map(int, input().split())
ans = 0
for i in range(1, b + 1):
	ans += i * f
print(max(0, ans - d))


(k, n, w) = [int(i) for i in input().split()]
sum = 0
for i in range(1, w + 1):
	sum += k * i
ans = n - sum
if not ans or ans > 0:
	print(0)
else:
	print(ans * -1)


inputs = input()
inputs = inputs.split(' ')
(each_banana_money, initial_money, banana_want) = inputs if len(inputs) == 3 else False
each_banana_money = int(each_banana_money)
initial_money = int(initial_money)
banana_want = int(banana_want)
requireMoney = 0
while int(banana_want) != 0:
	requireMoney = requireMoney + banana_want * each_banana_money
	banana_want -= 1
result = requireMoney - initial_money
if result < 0:
	print(0)
else:
	print(result)


(k, n, w) = [int(x) for x in input().split()]
print([k * (w * (w + 1)) // 2 - n, 0][n >= k * (w * (w + 1)) // 2])


nums = list(map(int, input().split(' ')))
res = nums[1] - nums[0] * nums[2] * (nums[2] + 1) / 2
res = -res if res < 0 else 0
print(int(res))


(x, y, z) = [int(i) for i in input().split(' ')]
b = 0
for i in range(1, z + 1):
	b += x * i
if y - b > 0:
	print(0)
else:
	print(b - y)


import math
list = [int(i) for i in input().split()]
if list[0] * (list[2] * (list[2] + 1) / 2) > list[1]:
	print(math.floor(list[0] * (list[2] * (list[2] + 1) / 2) - list[1]))
else:
	print(0)


(k, n, w) = map(int, input().split())
c = 0
for i in range(1, w + 1):
	p = i * k
	c = c + p
z = c - n
if z > 0:
	print(z)
else:
	print('0')


(k, n, w) = map(int, input().split())
ans = 0
haha = 0
while w > 0:
	w -= 1
	haha += 1
	ans += k * haha
if n < ans:
	ans -= n
else:
	ans = 0
print(ans)


s = [int(x) for x in input().split()]
k = s[0]
w = s[1]
n = s[2]
if (k + n * k) * n // 2 > w:
	print((k + n * k) * n // 2 - w)
else:
	print(0)


def sum(a):
	result = 0
	for i in range(0, a + 1):
		result = result + i
	return result
s = input().split()
k = int(s[0])
n = int(s[1])
w = int(s[2])
t = sum(w)
amount = t * k
if amount > n:
	r = amount - n
	print(r)
else:
	print('0')


(cost, balance, amount) = [int(x) for x in input().split()]
tot_cost = 0
for i in range(amount):
	tot_cost += (i + 1) * cost
nes_cost = tot_cost - balance if balance < tot_cost else 0
print(nes_cost)


(k, n, w) = map(int, input().strip().split(' '))
ks = 0
for i in range(1, w + 1):
	ks += k * i
if ks > n:
	r = ks - n
	print(r)
else:
	print(0)


(price, money, number) = (int(p) for p in input().split(' '))
neededMoney = price * (number * (number + 1)) / 2
if neededMoney <= money:
	print(0)
else:
	print(int(neededMoney - money))


s = input()
s = s.split()
k = int(s[0])
n = int(s[1])
w = int(s[2])
temp = 0
for i in range(w + 1):
	if i >= 1:
		temp += k * i
if n < temp:
	print(temp - n)
else:
	print('0')


s = input().split()
a = 0
for i in range(int(s[2])):
	a = a + i + 1
b = int(s[0]) * a
c = b - int(s[1])
if c > 0:
	print(c)
else:
	print(0)


(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
d = c * (c + 1) / 2
if int(d * a - b) > 0:
	print(int(d * a - b))
else:
	print(0)


import sys
import math
import functools
import itertools
s = [int(i) for i in input().split()]
k = s[0]
(n, w) = (s[1], s[2])
money = 0
for i in range(1, w + 1):
	money += i * k
result = money - n
if result > 0:
	print(result)
else:
	print(0)


from sys import stdin

def main():
	(k, n, w) = stdin.readline().split()
	k = int(k)
	n = int(n)
	w = int(w)
	a = k * ((1 + w) * w / 2) - n
	if a <= 0:
		print(0)
	else:
		print(int(a))
main()


def main():
	(k, n, w) = map(int, input().split())
	ans = k * w * (w + 1) // 2 - n
	ans = max(0, ans)
	print(ans)
main()


(k, n, w) = list(map(int, input().split()))
print(max(k * sum(range(w + 1)) - n, 0))


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
s = k * w * (w + 1) / 2
if n >= s:
	print(0)
if n < s:
	print(int(s - n))


zeile1 = input('')
l = []
zahl = ''
for i in range(len(zeile1)):
	if zeile1[i] != ' ':
		zahl = zahl + zeile1[i]
	else:
		l.append(int(zahl))
		zahl = ''
	if i == len(zeile1) - 1:
		l.append(int(zahl))
		zahl = ''
summe = 0
k = l[0]
n = l[1]
w = l[2]
for i in range(w):
	summe += k * (1 + i)
summe -= n
if summe >= 0:
	print(summe)
else:
	print(0)


(k, n, w) = [int(i) for i in input().split()]
total_cost = w * (w + 1) * k / 2
print(max(int(total_cost - n), 0))


knw = input().split()
k = int(knw[0])
n = int(knw[1])
w = int(knw[2])
o = k * ((w + 1) * w // 2)
if o <= n:
	print(0)
else:
	print(o - n)


def list_input():
	return list(map(int, input().split()))

def multiple_input():
	return map(int, input().split())

def sum_of_ap(a, n):
	return n / 2 * (a + a * n)
(k, m, w) = multiple_input()
total = sum_of_ap(k, w)
if m >= total:
	print(0)
else:
	print(int(total - m))


ip = input().split()
k = int(ip[0])
n = int(ip[1])
w = int(ip[2])
s = 0
for i in range(w + 1):
	s = s + i
	i = i + 1
sum = k * s
a = sum - n
if a > 0:
	print(a)
else:
	print(0)


(a, b, c) = map(int, input().split())
s = 0
k = 1
for i in range(c):
	s += k * a
	k += 1
if b - s > 0:
	print(0)
else:
	print(s - b)


a = input().split()
for i in range(len(a)):
	a[i] = int(a[i])
cost = 0
for i in range(a[2]):
	cost += a[0] * (i + 1)
if a[1] < cost:
	print(cost - a[1])
else:
	print(0)


s = input()
ns = s.split()
k = int(ns[0])
n = int(ns[1])
w = int(ns[2])
i = 1
s = 0
for i in range(w + 1):
	s = s + i * k
r = s - n
if r >= 0:
	print(r)
elif r < 0:
	print('0')


x = input().split()
counter = 0
for i in range(int(x[2])):
	counter += (i + 1) * int(x[0])
if counter - int(x[1]) <= 0:
	print(0)
else:
	print(counter - int(x[1]))


(k, n, w) = map(int, input().split())
s = w / 2 * (2 * k + (w - 1) * k)
if s <= n:
	print('0')
else:
	print('{:.0f}'.format(s - n))


c = input()
a = c.split()
b = []
for i in a:
	b.append(int(i))
d = b[0]
money = b[1]
w = b[2]
nniy = d + d * (w - 1)
sum = (d + nniy) * w / 2
if sum - money >= 0:
	print(int(sum - money))
else:
	print(0)


try:
	(k, n, w) = map(int, input().split())
	cost = 0
	for i in range(1, w + 1):
		cost = cost + k * i
	borrow = cost - n
	if borrow <= 0:
		print(0)
	else:
		print(borrow)
except:
	pass


(a, b, c) = map(int, input().split())
print(max(a * c * (c + 1) // 2 - b, 0))


(k, n, w) = map(int, input().split())
m = k * (w + 1) * w // 2
r = m - n if m > n else 0
print(r)


def main():
	import sys
	(k, n, w) = map(int, sys.stdin.readline().strip().split())
	p = k * (w * (w + 1) // 2)
	if p > n:
		print(p - n)
	else:
		print(0)
main()


(k, n, w) = map(int, input().split())
total = 0
for i in range(w):
	total += k * (i + 1)
if n - total > 0:
	print(0)
else:
	print(str(abs(total - n)))


(cost, money, n) = [int(x) for x in input().split()]
sum = 0
for i in range(1, n + 1):
	sum += cost * i
res = sum - money
if res > 0:
	print(res)
else:
	print(0)


x = input()
s = x.split(' ')
k = int(s[0])
d = int(s[1])
bana = int(s[2])
sum = 0
for i in range(1, bana + 1):
	sum = sum + i * k
how = sum - d
if how > 0:
	print(how)
else:
	print(0)


line = str(input()).split(' ')
k = int(line[0])
n = int(line[1])
w = int(line[2])
pay = 0
for i in range(w):
	pay = pay + (i + 1) * k
if pay - n > 0:
	print(pay - n)
else:
	print(0)


num = list(map(int, input().rstrip().split()))
c = 0
for t in range(1, num[2] + 1):
	c += t * num[0]
if c > num[1]:
	print(c - num[1])
else:
	print('0')


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
mult = 0
for i in range(1, c + 1):
	mult = mult + a * i
diff = mult - b
if diff > 0:
	print(diff)
else:
	print(0)


knw = [int(number) for number in input().split(' ')]
k = knw[0]
n = knw[1]
w = knw[2]
summa = 0
for i in range(1, w + 1):
	summa += i * k
summa -= n
if summa < 0:
	summa = 0
print(summa)


def problema(preciobanana, dolaresiniciales, numerobananas):
	total = preciobanana * (numerobananas * (numerobananas + 1)) / 2 - dolaresiniciales
	if total <= 0:
		print(0)
	else:
		print(int(total))
a = input()
b = a.split()
problema(int(b[0]), int(b[1]), int(b[2]))


(a, b, c) = map(int, input('').split(' '))
amountNeeded = a * c * (c + 1) / 2
if b < amountNeeded:
	print(int(amountNeeded - b))
else:
	print(0)


(df, fg, gh) = list(map(int, input().split()))
p = 0
for t in range(1, gh + 1):
	p = p + df * t
p = p - fg
if p <= 0:
	print(0)
else:
	print(p)


(k, n, w) = map(int, input().split())
if n - sum(range(w + 1)) * k >= 0:
	print('0')
else:
	print(sum(range(w + 1)) * k - n)


(k, n, w) = [int(x) for x in input().split(' ')]
cost = sum([l * k for l in range(1, w + 1)])
if cost - n < 0:
	print(0)
else:
	print(cost - n)


(g, b, c) = map(int, input().split())
sum = 0
for i in range(c):
	sum += g * (i + 1)
if sum > b:
	print(sum - b)
else:
	print(0)


z = input().split(' ')
k = int(z[0])
n = int(z[1])
w = int(z[2])
sum = 0
now = k
for i in range(0, w):
	sum = sum + now
	now = now + k
print(max(0, sum - n))


l = [int(x) for x in input().split()]
x = l[2] * (l[2] + 1) // 2
x *= l[0]
if x > l[1]:
	print(x - l[1])
else:
	print('0')


(in0, in1, in2) = [int(x) for x in input().split()]
out0 = 0
for x in range(1, in2 + 1):
	out0 += in0 * x
if out0 > in1:
	print(out0 - in1)
else:
	print(0)


import sys as s
for v in s.stdin:
	v = v.strip().split()
	(a, b, c) = (int(v[0]), int(v[1]), int(v[2]))
	j = 0
	for i in range(c + 1):
		j += i * a
	if j > b:
		print(j - b)
		break
	else:
		print(0)


KNW = input().split()
k = int(KNW[0])
n = int(KNW[1])
w = int(KNW[2])
amount = k * (w * (w + 1)) // 2
if amount >= n:
	print(amount - n)
else:
	print(0)


(first_banana, initial_money, num_bananas) = input().split(' ')
first_banana = int(first_banana)
initial_money = int(initial_money)
num_bananas = int(num_bananas)
needed_money = 0

def total_sum(w, k):
	i_banana = 0
	for i in range(w + 1):
		i_banana += i * k
	return i_banana
total = total_sum(num_bananas, first_banana)
total = int(total)
needed_money = total - initial_money
needed_money = int(needed_money)
if needed_money < 0:
	print(0)
else:
	print(needed_money)


n = list(input().split())
cost = 0
for i in range(1, int(n[2]) + 1):
	cost = cost + i * int(n[0])
if cost - int(n[1]) <= 0:
	print(0)
else:
	print(cost - int(n[1]))


input = input()
(k, n, w) = input.split()
k = int(k)
n = int(n)
w = int(w)
pay = 0
i = 1
while i <= w:
	pay += k * i
	i += 1
if pay <= n:
	print('0')
else:
	print(str(pay - n))


(k, n, w) = map(int, input().split())
payment = 0
increment = 0
for item in range(w):
	increment = k * (item + 1)
	payment = payment + increment
print(['0', payment - n][payment - n > 0])


(k, n, w) = map(int, input().split())
cost = 0
for i in range(1, w + 1):
	cost = cost + i * k
if cost < n:
	print('0')
else:
	moneyNeed = cost - n
	print(moneyNeed)


(price, inhand, want) = map(int, input().split())
priceall = int((price + want * price) * want / 2)
if inhand < priceall:
	print(priceall - inhand)
else:
	print('0')


data = input().split()
k = int(data[0])
n = int(data[1])
w = int(data[2])
total = 0
i = 1
while w != 0:
	total += k * i
	w -= 1
	i += 1
if total - n < 0:
	print(0)
else:
	print(total - n)


def borrow(k):
	bor = 0
	for i in range(int(k[2])):
		bor = bor + int(k[0]) * (i + 1)
	bor2 = bor - int(k[1])
	if bor2 > 0:
		return bor2
	if bor2 <= 0:
		return 0
k = input().split()
x = borrow(k)
print(x)


info = input()
(cost, wallet, bananas) = info.split()
cost = int(cost)
wallet = int(wallet)
bananas = int(bananas)
s = 0
for i in range(1, bananas + 1):
	s += cost * i
if s > wallet:
	print(s - wallet)
else:
	print('0')


def wave():
	x = input()
	x = x.split(' ')
	k = int(x[0])
	n = int(x[1])
	w = int(x[2])
	sum = 0
	t = 1
	for i in range(w):
		sum = sum + t * k
		t = t + 1
	if sum - n <= 0:
		return 0
	return sum - n
print(wave())


(l, n, d) = map(int, input().split())
a = l
for i in range(2, d + 1):
	a += i * l
if a > n:
	print(a - n)
else:
	print(0)


(k, n, w) = list(map(int, input().split()))
money = 0
count = 1
while count <= w:
	money += k * count
	count += 1
if money - n < 0:
	print(0)
else:
	print(money - n)


(k, n, w) = [int(x) for x in input().split(' ')]
print(max(0, sum((i * k for i in range(1, w + 1))) - n))


(k, n, w) = map(int, input().split())
print(int(w * (w + 1) * 0.5 * k - n) if int(w * (w + 1) * 0.5 * k - n) > 0 else 0)


(k, n, w) = map(int, input().strip().split())
x = (w + 1) * w // 2 * k
if x >= n:
	print(x - n)
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
cost = k
s = 0
for _ in range(w):
	s += cost
	cost += k
if n - s < 0:
	print(s - n)
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
b = int(0.5 * w * (2 * k + w * k - k)) - n
if b > 0:
	print(b)
else:
	print(0)


(n, h, w) = map(int, input().split())
c = 0
for i in range(1, w + 1):
	c = c + i * n
if c - h > 0:
	print(c - h)
else:
	print(0)


x = list(map(int, input().split()))
k = x[0]
n = x[1]
w = x[2]
s = w * (2 * k + (w - 1) * k) // 2
if s > n:
	print(s - n)
else:
	print(0)


(x, y, z) = map(int, input().split())
sum = 0
for i in range(1, z + 1):
	sum = sum + i * x
if sum > y:
	print(sum - y)
else:
	print('0')


(rate, money, num) = input().split()
(rate, money, num) = (int(rate), int(money), int(num))
price = num * (num + 1) / 2 * rate
if price - money > 0:
	print(int(price - money))
else:
	print(0)


q = input().split()
c1 = int(q[0])
d = int(q[1])
n = int(q[2])
cn = c1 * 0.5 * n * (n + 1)
if cn - d < 0:
	print(0)
else:
	print(int(cn - d))


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
aux = 0
for i in range(1, c + 1, 1):
	aux += a * i
if aux < b:
	print(0)
else:
	print(aux - b)


a = input().split(' ')
ilosc = int(a[2])
cena_pocz = int(a[0])
price = 0
for i in range(ilosc):
	price = price + (i + 1) * cena_pocz
diff = price - int(a[1])
if diff > 0:
	print(diff)
else:
	print(0)


(k, c, n) = map(int, input().split())
cost = 0
for i in range(1, n + 1):
	cost += k * i
if cost <= c:
	print(0)
else:
	print(cost - c)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
w_cost = 0
for i in range(w):
	w_cost += k * (i + 1)
if w_cost - n <= 0:
	print('0')
else:
	print(w_cost - n)


def String_to_Lists(String):
	list1 = list(String.split(' '))
	return list1

def main_approach(list):
	k = int(list[0])
	n = int(list[1])
	w = int(list[2])
	i = 0
	sums = 0
	while i < w:
		i += 1
		a = i * k
		sums = sums + a
	if sums - n < 0:
		print('0')
	else:
		print(sums - n)
str1 = input()
list1 = String_to_Lists(str1)
main_approach(list1)


from math import floor
inp = input()
inpL = inp.split(' ')
k = int(inpL[0])
n = int(inpL[1])
w = int(inpL[2])
s = k * w * (w + 1) / 2
if n >= s:
	print(0)
else:
	print(floor(s - n))


(k, n, w) = map(int, input().split())
w = w * (w + 1) // 2
ans = w * k - n
if ans <= 0:
	ans = 0
print(ans)


(k3, n17, w4) = map(int, input().split())
a = 1
b = 0
c = 0
for i in range(w4):
	b = k3 * a
	a += 1
	c = c + b
	d = c - n17
if d > 0:
	print(d)
else:
	print(0)


(a, b, c) = map(int, input().split()[:3])
res = 0
for i in range(1, c + 1):
	res += i * a
print(res - b if res > b else '0')


l = list(map(int, input().split()))
count = 0
for i in range(l[2] + 1):
	count += i * l[0]
if count == l[1]:
	print(0)
elif count < l[1]:
	print(0)
else:
	print(count - l[1])


(k, n, w) = map(int, input().split())
tnd = 0
Ntb = 0
for i in range(1, w + 1):
	tnd = tnd + k * i
	Ntb = tnd - n
if Ntb > 0:
	print(Ntb)
if Ntb <= 0:
	print('0')


(k, n, w) = map(int, input().split())
Total = 0
for i in range(1, w + 1):
	Total += k * i
MoneyBorrowed = Total - n
if MoneyBorrowed > 0:
	print(MoneyBorrowed)
else:
	print('0')


def solve():
	(k, n, w) = map(int, input().split(' '))
	cost = 0
	for i in range(w):
		cost += (i + 1) * k
	if cost - n < 0:
		cost = n
	print(cost - n)
solve()


inputs = [int(a) for a in input().strip().split(' ')]
(price, money, num_banana) = (inputs[0], inputs[1], inputs[2])
total = 0
for x in range(1, num_banana + 1):
	total += price * x
if total > money:
	print(total - money)
else:
	print(0)


(i, m, n) = map(int, input().split())
p = int(i * (n * (n + 1) / 2) - m)
if p > 0:
	print(p)
else:
	print('0')


(k, n, w) = map(int, input().split())
borrow = 0
if n < (k + w * k) * w / 2:
	borrow = (k + w * k) * w / 2 - n
print(round(borrow))


def cf_546a():
	(k, n, w) = map(int, input().split())
	total_cost = k * w * (w + 1) / 2
	print(int(max(total_cost - n, 0)))
cf_546a()


def factor(m, k):
	fact = 0
	for i in range(k):
		fact += m * (i + 1)
	return fact
(k, n, w) = map(int, input().split())
print(max(0, factor(k, w) - n))


(k, n, w) = map(int, input().split())
total = 0
borrow = 0
for i in range(w):
	total += (i + 1) * k
if n < total:
	borrow = total - n
print(borrow)


inputDate = [int(x) for x in input().split(' ')]
price = inputDate[0]
cash = inputDate[1]
countBananas = inputDate[2]
i = 1
amount = 0
while countBananas > 0:
	amount += price * i
	i += 1
	countBananas -= 1
result = amount - cash
if result > 0:
	print(result)
else:
	print(0)


class CodeforcesTask546ASolution:

	def __init__(self):
		self.result = ''
		self.k_n_w = []

	def read_input(self):
		self.k_n_w = [int(x) for x in input().split(' ')]

	def process_task(self):
		all_price = 0
		for x in range(self.k_n_w[2]):
			all_price += self.k_n_w[0] * (x + 1)
		missing = -(self.k_n_w[1] - all_price)
		self.result = str(max(0, missing))

	def get_result(self):
		return self.result
Solution = CodeforcesTask546ASolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


x = input('')
m = x.split()
k = int(m[0])
w = int(m[1])
n = int(m[2])
s = 0
if k >= 1:
	if 0 <= n and n <= 10 ** 9:
		for i in range(1, n + 1):
			s = s + i * k
if s > w:
	print(s - w)
else:
	print('0')


arrStr = input().split()
arrInt = list(map(int, arrStr))
sum = 0
for i in range(1, arrInt[2] + 1):
	sum += i * arrInt[0]
if arrInt[1] >= sum:
	print(0)
else:
	print(sum - arrInt[1])


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
cost = 0
for i in range(1, w + 1):
	cost += i * k
borrow = cost - n
if borrow > 0:
	print(borrow)
else:
	print(0)


l = input().split()
k = int(l[0])
n = int(l[1])
w = int(l[2])
total = k * (w * (w + 1)) / 2
if total - n > 0:
	print(int(total - n))
else:
	print(0)


def somatorio(cost, nbananas):
	return float(cost) * nbananas * (nbananas + 1) / 2
values = [int(x) for x in input().split()]
banana_cost = values[0]
money = values[1]
nbananas = values[2]
res = somatorio(banana_cost, nbananas)
res = res - money
if res < 0:
	res = 0
print(int(res))


(k, n, w) = map(int, input().split())
q = 0
e = 0
for i in range(w):
	e = i + 1
	q += e * k
if q > n:
	print(q - n)
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
x = 0
for i in range(1, int(w) + 1):
	x += k * i
a = x - int(n)
if a > 0:
	print(a)
else:
	print(0)


tmp = input().split()
k = int(tmp[0])
n = int(tmp[1])
w = int(tmp[2])
sum = int(w * (w + 1) * k / 2)
if sum <= n:
	print(0)
else:
	print(sum - n)


(cost, dollars, banana) = input().split(' ')
cost = int(cost)
dollars = int(dollars)
banana = int(banana)
total_cost = 0
for i in range(banana):
	total_cost = total_cost + cost * (1 + i)
borrow = total_cost - dollars
if borrow <= 0:
	print(0)
else:
	print(borrow)


(k, n, w) = input().split()
i = 1
s = 0
while i <= int(w):
	s += i * int(k)
	i += 1
print(s - int(n) if int(n) < s else 0)


(k, n, w) = input().split()
t = 0
for i in range(0, int(w)):
	t = t + (i + 1) * int(k)
d = t - int(n)
if d > 0:
	print(d)
else:
	print('0')


(k1, n1, w1) = input().split()
k = int(k1)
n = int(n1)
w = int(w1)
cost = k * w * (w + 1) // 2
if cost - n > 0:
	print(cost - n)
else:
	print(0)


(k, n, w) = list(map(int, input().split()))
total_amount = sum(range(0, w * k + 1, k))
money_needed = total_amount - n if total_amount > n else 0
print(money_needed)


text = input()
inp = text.split(' ')
cost = int(inp[0])
base = int(inp[1])
n = int(inp[2])
summ = 0
for i in range(1, n + 1):
	summ = summ + i
if summ * cost > base:
	print(summ * cost - base)
else:
	print(0)


from sys import stdin, stdout

def main():
	inp = [int(i) for i in input().split(' ')]
	money = inp[1]
	pay = 0
	for i in range(1, inp[2] + 1):
		pay = pay + i * inp[0]
	hutang = pay - money
	if hutang >= 0:
		print(hutang)
	else:
		print(0)
main()


s = input().split(' ')
c = int(s[0]) * int(s[2]) * (int(s[2]) + 1) // 2
if c > int(s[1]):
	print(c - int(s[1]))
else:
	print('0')


(k, n, w) = [int(x) for x in input().split()]
need = 0
total = 0
d = k
for i in range(w):
	total += d
	d += k
if total - n < 0:
	print('0')
else:
	print(total - n)


(price, account, bananas) = map(int, input().split())
amount = bananas * (2 * price + (bananas - 1) * price) / 2
borrow = amount - account
if borrow <= 0:
	print('0')
else:
	print(int(borrow))


(k, n, w) = map(int, input().split())
lw = []
for i in range(1, w + 1):
	lw.append(k * i)
sum_w = sum(lw)
b = sum_w - n
if b < 1:
	print(0)
else:
	print(b)


ord: str = input()
(cost, dollar, banana) = ord.split(' ')
(cost, dollar, banana) = (int(cost), int(dollar), int(banana))
price = 0
while banana > 0:
	price = price + cost * banana
	banana = banana - 1
price = price - dollar
if price >= 0:
	print(price)
else:
	print(0)


(k, n, w) = input().split()
i = 0
f = 1
x = 0
while i < int(w):
	x = int(k) * f + x
	f += 1
	i = i + 1
if int(n) > x:
	print(0)
else:
	print(x - int(n))


(k, n, w) = [int(i) for i in input().split()[:3]]
result = 0
for i in range(1, w + 1):
	result += i * k
if result <= n:
	print(0)
else:
	print(result - n)


(k, n, w) = map(int, input().split())
t = 0
for i in range(0, w):
	t = k * (i + 1) + t
u = t - n
if u > 0:
	print(u)
if u <= 0:
	print(0)


def func(k, n, w):
	if w <= 0:
		return 0
	s = 0
	i = 1
	while i <= w:
		s += i * k
		i += 1
	if s <= n:
		return 0
	return s - n
(k, n, w) = tuple(map(int, input().split()))
print(func(k, n, w))


a = list(map(int, input().split()))
d = 0
for i in range(a[2]):
	d += a[0] * (i + 1)
print(max(0, d - a[1]))


(k, n, w) = input().split()
k1 = int(k)
n1 = int(n)
w1 = int(w)
amount = 0
for i in range(1, w1 + 1):
	amount = amount + i * int(k1)
borrow = 0
if n1 < amount:
	borrow = amount - n1
print(borrow)


def sign(x):
	if x <= 0:
		return 0
	else:
		return int(x)
(k, w, y) = list(map(int, input().split()))
print(sign((1 + y) * y * k / 2 - w))


list1 = list(map(int, input().split()))
l1 = list1[0]
l2 = list1[1]
l3 = list1[2]
newList = []
for i in range(1, l3 + 1):
	newList.append(i * l1)
sumList = sum(newList)
if sumList <= l2:
	print(0)
else:
	print(sumList - l2)


inp = input()
inp = inp.split(' ')
cost = int(inp[0])
current_dollars = int(inp[1])
num_bananas = int(inp[2])
total_cost = 0
for i in range(num_bananas):
	total_cost += (i + 1) * cost
if current_dollars > total_cost:
	print(0)
else:
	print(total_cost - current_dollars)


l = list(map(int, input().rstrip().split()))
a = l[0]
b = l[1]
c = l[2]
sum = 0
for k in range(1, c + 1):
	x = k * a
	sum = sum + x
y = sum - b
if y > 0:
	print(y)
else:
	print('0')


(k, n, w) = list(map(int, input().strip().split()))
money_total = w * (2 * k + (w - 1) * k) // 2
if money_total > n:
	answer = money_total - n
else:
	answer = 0
print(answer)


m = input().split()
price = 0
pricefor1 = int(m[0])
money = int(m[1])
number = int(m[2])
counter = 1
while counter <= number:
	price = price + pricefor1 * counter
	counter = counter + 1
if price > money:
	print(price - money)
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
c = 0
while w > 0:
	c += w * k
	w -= 1
if c - n > 0:
	print(c - n)
else:
	print(0)


def solve(k, n, w):
	totalMoneyNeeded = w * (w + 1) * k / 2
	return max(totalMoneyNeeded - n, 0)
inputs = input().split(' ')
print(int(solve(int(inputs[0]), int(inputs[1]), int(inputs[2]))))


i = input().split()
(k, n, w) = (int(i[0]), int(i[1]), int(i[2]))
price = 0
for j in range(1, w + 1):
	price += j * k
if price <= n:
	print(0)
else:
	print(abs(price - n))


(k, n, w) = map(int, input().split())
cost = 0
for i in range(1, w + 1):
	x = k * i
	cost = cost + x
loan = cost - n
if loan < 0:
	loan = 0
print(loan)


from sys import stdin

def solve(precio, dolar, bananas):
	if bananas == 1:
		if precio <= dolar:
			print(0)
		else:
			print(precio - dolar)
	else:
		res = precio * (bananas * (bananas + 1) // 2)
		if res <= dolar:
			print(0)
		else:
			print(res - dolar)

def main():
	(precio, dolar, bananas) = m = list(map(int, stdin.readline().strip().split()))
	solve(precio, dolar, bananas)
main()


(n, m, l) = map(int, input().split())
k = l * (l + 1) // 2 * n
if k > m:
	print(k - m)
else:
	print(0)


s = input()
a = s.split()
for i in range(len(a)):
	a[i] = int(a[i])
pay = 0
for i in range(a[2]):
	pay += (i + 1) * a[0]
if pay <= a[1]:
	print(0)
else:
	print(pay - a[1])


(k, w, n) = map(int, input().split())
x = list(range(1, n + 1))
result = sum(x) * k - w
if result > 0:
	print(result)
else:
	print(0)


n = input().split(' ')
prix = 0
for i in range(int(n[2]) + 1):
	prix = prix + i * int(n[0])
if int(n[1]) - prix < 0:
	print(abs(int(n[1]) - prix))
else:
	print(0)


def calculate(k, n, w):
	k = int(k)
	n = int(n)
	w = int(w)
	cost = 0
	while w > 0:
		cost = cost + k * w
		w = w - 1
	if n - cost > 0:
		return 0
	else:
		return (n - cost) * -1
(k, n, w) = [int(x) for x in input().split()]
print(calculate(k, n, w))


(k, amount, banana) = map(int, input().split())
borrow = k * sum(range(banana + 1)) - amount
print(0 if borrow < 0 else borrow)


s = [int(i) for i in input().split()]
no_ban = s[2]
tot_mon = s[1]
ban_cost = s[0]
tot_cost = 0
for i in range(1, no_ban + 1):
	tot_cost += i * ban_cost
if tot_cost < tot_mon:
	print('0')
else:
	print(abs(tot_mon - tot_cost))


def ban(quantity, price, cost):
	zero = 0
	for i in range(1, cost + 1):
		zero += quantity * i
	zero = zero - price
	if zero <= 0:
		return 0
	return zero
(quantity, price, cost) = map(int, input().split())
if cost == 0:
	print(cost)
else:
	print(ban(quantity, price, cost))


def ban(precio, dol, bana):
	dollars = 0
	for i in range(1, bana + 1):
		dollars += precio * i
	dollars = dollars - dol
	if dollars <= 0:
		return 0
	return dollars
(precio, dol, bana) = map(int, input().split())
if bana == 0:
	print(bana)
else:
	print(ban(precio, dol, bana))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
sums = 0
for i in range(w + 1):
	totalMoneyNeeded = w * (w + 1) * k / 2
print(int(max(totalMoneyNeeded - n, 0)))


(k, n, w) = map(int, input().split())
required = w * (w + 1) // 2 * k
borrow = required - n
if borrow < 0:
	print(0)
else:
	print(borrow)


(k, n, w) = map(int, input().split())
ans = 0
for i in range(1, w + 1):
	ans = ans + k * i
ans = max(0, ans - n)
print(str(ans))


(a, b, c) = map(int, input().split())
print([0, sum((a * i for i in range(1, c + 1))) - b][sum((a * i for i in range(1, c + 1))) - b > 0])


(k, n, w) = input().split()
k = int(k)
w = int(w)
n = int(n)
lst = []
total = 0
for i in range(1, w + 1):
	x = k * i
	lst.append(x)
for i in range(len(lst)):
	total = total + lst[i]
print(max(total - n, 0))


n = input().split()
Bnum = int(n[2])
D = int(n[0])
HD = int(n[1])
s = 0
for i in range(1, Bnum + 1):
	s += i * D
p = s - HD
if p < 0:
	print(0)
else:
	print(p)


(k, n, w) = map(int, input().split())
total_money = 0
for i in range(w):
	m = (i + 1) * k
	total_money += m
	lend = total_money - n
if lend > 0:
	print(lend)
else:
	print(0)


(x, y, z) = map(int, input().split())
p = 0
for t in range(1, z + 1):
	p = p + t * x
l = p - y
if l >= 0:
	print(l)
elif l < 0:
	print(0)


x = input()
x1 = x.split(' ')
rate1 = int(x1[0])
wallet = int(x1[1])
nofb = int(x1[2])
sumt = 0
for i in range(nofb):
	sumt += (i + 1) * rate1
if sumt > wallet:
	print(sumt - wallet)
else:
	print(0)


(k, m, n) = map(int, input().split())
print(max(0, k * (n ** 2 + n) // 2 - m))


(cost, money, n) = tuple(map(int, input().split()))
totalprice = n * (n + 1) / 2 * cost
if money < totalprice:
	print(int(totalprice - money))
else:
	print(0)


inp = input().split(' ')
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
sum_price = 0
for i in range(1, w + 1):
	sum_price += i * k
if sum_price > n:
	print(sum_price - n)
if sum_price <= n:
	print(0)


(k, n, w) = input().split()
k_int = 0
for i in range(int(w)):
	k_int += (i + 1) * int(k)
res = k_int - int(n)
if res < 0:
	res = 0
print(res)


(k, n, w) = map(int, input().split())
S = w * (w + 1) * k / 2
Ans = S - n
if Ans >= 0:
	print(int(Ans))
else:
	print('0')


def solve(f_cost, dollars, wanted):
	spent = 0
	for i in range(1, wanted + 1):
		spent += i * f_cost
	if spent - dollars > 0:
		return spent - dollars
	else:
		return 0
(fcost, amount, want) = input().split()
print(solve(int(fcost), int(amount), int(want)))


k = list(map(int, input().split()))
s = 0
for i in range(k[2] + 1):
	s = s + i * k[0]
ans = s - k[1]
if ans < 1:
	ans = 0
print(ans)


(k, n, w) = [int(x) for x in input().split()]
money = 0
for x in range(1, w + 1):
	money += k * x
if money <= n:
	print(0)
else:
	print(money - n)


(w, d, k) = map(int, input().split())
if d >= k * (k + 1) // 2 * w:
	print(0)
else:
	print(k * (k + 1) // 2 * w - d)


finput = input()
input_2 = finput.split()
k = int(input_2[0])
n = int(input_2[1])
w = int(input_2[2])
the_price = 0
for a in range(0, w + 1):
	the_price += a * k
if n > the_price:
	print(0)
else:
	print(the_price - n)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(k, n, m) = LI()
	t = k * (m * (m + 1) // 2)
	r = max(t - n, 0)
	return r
print(main())


l = list(map(int, input().split()))
res = 0
for i in range(1, l[2] + 1):
	res = res + i * l[0]
if res > l[1]:
	print(res - l[1])
else:
	print('0')


(a, val, n) = map(int, input().split())
ans = 2 * a + (n - 1) * a
sum1 = n * ans // 2
if sum1 > val:
	print(sum1 - val)
else:
	print('0')


(k, n, w) = map(lambda x: int(x), input().split())
money_to_borrow = int(w * (w + 1) / 2 * k - n)
print(money_to_borrow if money_to_borrow > 0 else 0)


inputstr = str(input())
inputstr_2 = inputstr.split(' ')
k = int(inputstr_2[0])
n = int(inputstr_2[1])
w = int(inputstr_2[2])
M_t = 1
price = 0
for o in range(w):
	price = price + M_t * k
	M_t = M_t + 1
if price < n:
	money_borrow = 0
else:
	money_borrow = price - n
print(money_borrow)


(x, y, z) = [int(x) for x in input().split()]
n = z * (z + 1) * x / 2 - y
if n > 0:
	print(int(n))
else:
	print(0)


def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
(k, n, w) = mi()
c = w * (w + 1) * k
c //= 2
ans = c - n
if ans < 0:
	ans = 0
print(ans)


(m, p, x) = map(int, input().split())
print(max(0, x * (x + 1) * m // 2 - p))


l = list(map(int, input().split()))
k = l[0]
n = l[1]
w = l[2]
rs = 0
for i in range(1, w + 1):
	rs += k * i
print(max(0, rs - n))


def suma(x):
	d = 0
	for i in range(x + 1):
		d += i
	return d
(k, n, w) = map(int, input().split())
if n - k * suma(w) >= 0:
	print(0)
else:
	print(abs(n - k * suma(w)))


(cost, money, amount, *_) = map(int, input().split(' '))
totalcost = sum(range(1, amount + 1)) * cost
print(max(totalcost - money, 0))


(k, n, w) = map(int, input().split())
a = 0
while w != 0:
	if w == 0:
		break
	else:
		a += w
		w -= 1
if a * k - n < 0:
	print(0)
else:
	print(a * k - n)


(k, n, w) = input().split()
money = 0
for i in range(1, int(w) + 1):
	money += int(k) * i
if int(n) >= money:
	print('0')
elif int(n) < money:
	print(abs(money - int(n)))


(n1, n2, n3) = map(int, input().split())
s = 0
for i in range(n3):
	s = s + n1 * (i + 1)
if s - n2 > 0:
	print(s - n2)
else:
	print('0')


input1 = input().split()
k = int(input1[0])
n = int(input1[1])
w = int(input1[2])
sum1 = w * (w + 1) // 2
costofbananas = sum1 * k
if costofbananas - n > 0:
	print(costofbananas - n)
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
total_cost = 0
remain = 0
if k >= 1 and w <= 1000 and (0 <= n <= 1000000000):
	for i in range(1, w + 1):
		value = i * k
		total_cost = total_cost + value
	remain = total_cost - n
	if remain > 0:
		print(remain)
	else:
		print('0')


from math import *
import sys
sys.setrecursionlimit(1500)
(k, n, w) = list(map(int, input().split()))

def cost(_n):
	if _n == 0:
		return 0
	else:
		return k * _n + cost(_n - 1)
if cost(w) - n > 0:
	print(cost(w) - n)
else:
	print(0)


inputs = input().split()
needed = int(inputs[0]) * sum(list(range(1, int(inputs[2]) + 1)))
has = int(inputs[1])
if needed <= has:
	print(0)
else:
	print(needed - has)


import sys
sys.setrecursionlimit(100000)
pole = [int(i) for i in input().split()]

def cost(pole, i, pom):
	pom += i * pole[0]
	if i != pole[2]:
		cost(pole, i + 1, pom)
	elif pom - pole[1] > 0:
		print(pom - pole[1])
	else:
		print(0)
cost(pole, 1, 0)


from math import *
(k, n, w) = map(int, input().split())
s = 0
for i in range(0, w):
	s += k * (i + 1)
if n > s:
	print(0)
else:
	print(s - n)


import math
(StartPrice, Money, Num) = map(int, input().split())
if math.ceil((2 * StartPrice + (Num - 1) * StartPrice) * Num / 2) <= Money:
	print(0)
else:
	print(math.ceil((2 * StartPrice + (Num - 1) * StartPrice) * Num / 2 - Money))


(k, n, w) = map(int, input().split())
x = w * (w + 1) * k / 2
if x > n:
	print(int(x - n))
elif x <= n:
	print(0)


ch = input()
l = ch.split()
k = int(l[0])
c = 0
for i in range(1, int(l[2]) + 1):
	c += k * i
if c > int(l[1]):
	print(c - int(l[1]))
else:
	print('0')


knw = input().split(' ')
k = int(knw[0])
n = int(knw[1])
w = int(knw[2])
total = k
for i in range(2, w + 1):
	total = total + i * k
if total > n:
	print(total - n)
else:
	print(0)


(k, n, m) = map(int, input().split())
ans = 0
tmp = k
for i in range(m):
	ans += k
	k += tmp
if ans - n < 0:
	print(0)
else:
	print(ans - n)


cwn = list(map(int, input().rstrip().split()))
c = cwn[0]
w = cwn[1]
n = cwn[2]
borrow = n * (c + n * c) / 2 - w
if borrow > 0:
	print(int(borrow))
else:
	print(0)


lis_input = [int(i) for i in input().split(' ')]
out_one = int(lis_input[2] * (lis_input[2] + 1) / 2)
out_two = int(out_one * lis_input[0] - lis_input[1])
if 0 <= out_two:
	print(out_two)
else:
	print(0)


k = [int(x) for x in input().split()]
r = k[2]
x = k[0] * (r * (r + 1) // 2)
if x - k[1] >= 0:
	print(x - k[1])
else:
	print('0')


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
pro = c * (c + 1) // 2
t = pro * a
if t > b:
	print(t - b)
else:
	print('0')


(k, n, w) = map(int, input().split())
sum = 0
i = 1
while i <= w:
	sum += i * k
	i += 1
a = sum - n
if a > 0:
	print(a)
else:
	print('0')


(x, y, z) = list(map(int, input().split()))
count = 0
for i in range(1, z + 1):
	count += x * i
if y >= count:
	print('0')
else:
	print(count - y)


asdf = input().split()
k = int(asdf[0])
n = int(asdf[1])
w = int(asdf[2])
c = int(w * (w + 1) / 2 * k)
if n >= c:
	print(0)
else:
	print(c - n)


knw = input().split()
cost = int(knw[0])
dollers = int(knw[1])
banana = int(knw[2])
total = 0
for i in range(1, banana + 1):
	total = total + i * cost
a = total - dollers
if a >= 0:
	print(a)
else:
	print(0)


(k, n, w) = map(int, input().split())
res = 0
j = 1
for i in range(w):
	res = res + j * k
	j += 1
if n > res:
	print(0)
else:
	print(res - n)


line = input().split()
cost = int(line[0])
dollars = int(line[1])
banana = int(line[2])
temp = 0
for c in range(1, banana + 1):
	temp = cost * c
	dollars -= temp
if dollars > 0:
	print(0)
else:
	print(-1 * dollars)


input_list = []
num = 0
while True:
	if num == 1:
		break
	line = input()
	line = line.split()
	line = list(map(int, line))
	num += 1
count = 1
cost = 0
for banana in range(line[2]):
	x = line[0] * count
	count += 1
	cost += x
if cost > line[1]:
	print(cost - line[1])
else:
	print(0)


(banana_cost, dollar, banana_amount) = [int(i) for i in input().split()]
s = sum([i * banana_cost for i in range(1, banana_amount + 1)])
if s > dollar:
	print(s - dollar)
else:
	print(0)


(initital_price, has_dollar, num_banana) = [int(i) for i in input().split()]
total_price = 0
for i in range(1, num_banana + 1):
	total_price += initital_price * i
result = total_price - has_dollar
if result > 0:
	print(result)
else:
	print(0)


import re
s = input()
num = re.compile('\\d{10}|\\d{9}|\\d{8}|\\d{7}|\\d{6}|\\d{5}|\\d{4}|\\d{3}|\\d{2}|\\d')
nums = num.findall(s)
k = int(nums[0])
n = int(nums[1])
w = int(nums[2])
c = 0
for i in range(1, w + 1):
	f = i * k
	c = c + f
ans = int(c - n)
if ans > 0:
	print(ans)
else:
	print('0')


def codeforces():
	(k, n, w) = map(int, input().split())
	sm = (k + w * k) * w / 2
	if sm <= n:
		return 0
	return int(sm - n)
print(codeforces())


inp = str(input())
inplist = inp.split()
k = int(inplist[0])
n = int(inplist[1])
w = int(inplist[2])
if k >= 1:
	if w <= 1000:
		if n >= 0 and n <= 10 ** 9:
			total = 0
			for i in range(w):
				x = (i + 1) * k
				total += x
			utang = total - n
			if utang <= 0:
				print(0)
			else:
				print(utang)
		else:
			exit(0)
	else:
		exit(0)
else:
	exit(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
if 1 <= k <= 1000 and 1 <= w <= 1000 and (0 <= n <= 10 ** 9):
	t = int(k * w * (w + 1) / 2)
	if t > n:
		print(abs(n - t))
	else:
		print('0')


def soldier_and_bananas(k, n, w):
	cost = 0
	for i in range(1, w + 1):
		cost += i * k
	borrow = max(cost - n, 0)
	return borrow
(k, n, w) = map(int, input().split())
print(soldier_and_bananas(k, n, w))


knw = list(map(int, input().split()))
(k, n, w, payment) = (knw[0], knw[1], knw[2], 0)
for i in range(w):
	payment += (i + 1) * k
print(payment - n if n < payment else 0)


(k, n, w) = list(map(int, input().split()))
dl = n - sum(range(1, w + 1)) * k
print(abs(dl) if dl < 0 else 0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
req = w * (w + 1) // 2
req = req * k
ans = req - n
if ans > 0:
	print(ans)
else:
	print(0)


from sys import stdin, stdout, stderr, setrecursionlimit
from io import StringIO
setrecursionlimit(100000)

def read():
	return stdin.readline().rstrip()

def reada(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readia(sep=None, maxsplit=-1):
	return [int(a) for a in reada(sep, maxsplit)]
(precio, dolares, bananas) = readia()
total = 0
for i in range(1, bananas + 1):
	total += precio * i
print(max(0, total - dolares))


l = list(map(int, input().split()))
d = 0
c = 0
for i in range(1, l[2] + 1):
	d = i * l[0]
	c = d + c
if c < l[1]:
	print(0)
else:
	print(c - l[1])


(k, n, w) = map(int, input().split())
tot = 0
for i in range(1, w + 1):
	tot = tot + i * k
dif = abs(n - tot)
if tot <= n:
	print(0)
else:
	print(dif)


n = list(map(int, input().split()))
a = n[0]
b = n[1]
c = n[2]
price = 0
for i in range(1, c + 1):
	price += a * i
if price > b:
	borrow = price - b
	print(borrow)
else:
	print('0')


(k, n, w) = map(int, input().strip().split()[:3])
v = 0
for i in range(1, w + 1):
	v = v + i * k
if v < n:
	print('0')
else:
	print(v - n)


line = [int(i) for i in input().split()]
sm = 0
for i in range(line[2] + 1):
	sm += i
if sm * line[0] <= line[1]:
	print(0)
else:
	print(line[0] * sm - line[1])


(k, n, w) = [int(i) for i in input().split(' ')]
c = int(k * w * (w + 1) * 0.5)
if c > n:
	print(c - n)
else:
	print('0')


(k, n, w) = [int(x) for x in input().split()]
sum = int(w * (w + 1) / 2)
res = int(sum * k - n)
if res <= 0:
	print(0)
else:
	print(res)


a = input()
a = a.split(' ')
price = int(a[0])
own = int(a[1])
number = int(a[2])
k = (number + 1) * number / 2
answer = k * price - own
if answer > 0:
	print(int(answer))
else:
	print(0)


import sys
import math as mt
input = sys.stdin.buffer.readline
t = 1
for __ in range(t):
	(k, n, w) = map(int, input().split())
	tc = w * (w + 1) // 2
	tc *= k
	print(max(tc - n, 0))


s = 0
(k, n, w) = map(int, input().split())
for i in range(1, w + 1):
	s += k * i
print(abs(min(0, n - s)))


data = input().split(' ')
k = int(data[0])
n = int(data[1])
w = int(data[2])
for i in range(1, w + 1):
	n -= k * i
if n <= 0:
	print(n * -1)
else:
	print(0)


def read_array():
	s = input()
	return [int(x) for x in s.split(' ')]
s = ''
num = read_array()
k = num[0]
n = num[1]
w = num[2]
q = (2 * k + (w - 1) * k) * w // 2
if q < n:
	print(0)
else:
	print(q - n)


def main():
	data = input().split()
	nums = list()
	amount = int(data[0])
	summ = 0
	for x in range(int(data[2])):
		summ += int(data[0])
		nums.append(summ)
	for n in range(len(nums) - 1):
		amount += nums[n + 1]
	if amount > int(data[1]):
		print(abs(amount - int(data[1])))
	else:
		print(0)
main()


def solve():
	(k, n, w) = list(map(int, input().split()))
	cost = k
	for i in range(2, w + 1):
		cost = cost + i * k
	if n >= cost:
		print(0)
	else:
		print(cost - n)

def main():
	solve()
main()


import math

def main():
	(k, n, w) = [int(x) for x in input().split()]
	ans = k * w * (w + 1) / 2 - n
	if ans < 0.0:
		ans = 0
	ans = int(ans)
	print(ans)
main()


inp = input().split()
t = 0
for num in range(1, int(inp[2]) + 1):
	t += int(inp[0]) * num
if t > int(inp[1]):
	print(abs(int(inp[1]) - t))
else:
	print(0)


(k, n, w) = map(int, input().strip().split())
total_sum = sum((x * k for x in range(1, w + 1)))
diff = total_sum - n
print(max(0, diff))


(cena, penaze_vojaka, pocet) = map(int, input().split())
celkom = pocet * (pocet + 1) * cena / 2
if celkom - penaze_vojaka < 0:
	print(0)
else:
	print(int(celkom - penaze_vojaka))


line = input().split()
firstBanana = int(line[0])
cash = int(line[1])
numberOfBanana = int(line[2])
total = 0
for i in range(numberOfBanana):
	total += (i + 1) * firstBanana
if total > cash:
	print(total - cash)
else:
	print(0)


valores = [int(i) for i in input().split()]
total = valores[0] * valores[2] * (valores[2] + 1) / 2
if valores[1] - total > 0:
	print(0)
else:
	print(int(total - valores[1]))


(k, n, w) = map(int, input().split())
x = 1
y = 0
while w > 0:
	y += k * x
	x += 1
	w -= 1
if y > n:
	print(y - n)
else:
	print(0)


import sys
(k, n, w) = sys.stdin.readline().split()
(k, n, w) = (int(k), int(n), int(w))
total = 0
for i in range(w):
	total += (i + 1) * k
if total > n:
	borrow = total - n
else:
	borrow = 0
sys.stdout.write(str(borrow) + '\n')


(k, n, w) = map(int, input().split())
result = sum([(x + 1) * k for x in range(w)])
print(0 if result <= n else result - n)


def intmaker(list):
	for i in range(len(list)):
		list[i] = int(list[i])
	return list
(k, n, w) = intmaker(input().split())
cost = 0
for i in range(w + 1):
	cost += k * i
if cost <= n:
	print('0')
else:
	print(cost - n)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def MI():
	return map(int, sys.stdin.readline().strip().split())

def LI():
	return list(map(int, sys.stdin.readline().strip().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().strip().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().strip().split()]

def LS():
	return sys.stdin.readline().strip().split()

def I():
	return int(sys.stdin.readline().strip())

def F():
	return float(sys.stdin.readline().strip())

def S():
	return sys.stdin.readline().strip()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))
from math import factorial, gcd
from random import choice, randint
from sys import stdin, stdout
inp = stdin.readline
out = stdout.write
(k, n, w) = MI()
p = 0
for i in range(1, w + 1):
	p += i * k
if p > n:
	print(p - n)
else:
	print(0)


l = [int(i) for i in input().split()]
k = l[0]
w = l[1]
m = l[2]
i = 1
while m > 0:
	m = m - 1
	w = w - k * i
	i = i + 1
if w < 0:
	print(abs(w))
else:
	print(0)


def iip():
	return int(input())

def sip():
	return input()

def mip():
	return map(int, input().split())

def lip():
	return list(map(int, input().split()))
(k, n, w) = mip()
val = 0
for i in range(w):
	val += k * (i + 1)
if val - n > 0:
	print(val - n)
else:
	print(0)


data = [int(x) for x in input().split()]
total = 0
for i in range(data[2]):
	total += data[0] * (i + 1)
if data[1] > total or data[1] == total:
	print(0)
else:
	print(total - data[1])


CBIDTB = list(map(int, input().rstrip().split()))
banana_cost = CBIDTB[0]
initial_dollars = CBIDTB[1]
Banana_to_buy = CBIDTB[2]
total_cost = 0
for banana in range(1, Banana_to_buy + 1):
	total_cost += banana * banana_cost
print(total_cost - initial_dollars) if total_cost - initial_dollars > 0 else print(0)


s = input().split()
k = 0
for i in range(1, int(s[-1]) + 1):
	k += int(s[0]) * i
ans = k - int(s[1])
if ans >= 0:
	print(ans)
else:
	print(0)


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
price = 0
c = 1
for i in range(w):
	price += k * c
	c += 1
if price > n:
	print(price - n)
else:
	print(0)


str = input().split()
(k, n, w) = (int(str[0]), int(str[1]), int(str[2]))
bill = (k + w * k) * w // 2
if bill > n:
	print(bill - n)
else:
	print(0)


(kcost, ndollar, whowmany) = map(int, input().split())
sum = 0
for i in range(1, whowmany + 1):
	sum = kcost * i + sum
if sum < ndollar:
	print(0)
else:
	print(sum - ndollar)


info = input()
a = info.split()
total = int(a[0]) * int(a[-1]) * (int(a[-1]) + 1) // 2
payment = total - int(a[1])
if payment >= 0:
	print(payment)
else:
	print(0)


(k, n, w) = map(int, input().split())
s = w * (w + 1) // 2 * k
if n >= s:
	print('0')
else:
	d = abs(n - s)
	print(d)


(k, n, w) = input().split(' ')
k = int(k)
n = int(n)
w = int(w)
result = w * (w + 1) // 2 * k - n
if result > -1:
	print(result)
else:
	print(0)


first = input().split(' ')
k = int(first[0])
n = int(first[1])
w = int(first[2])
u = w
i = 0
for t in range(w):
	i = i + w - t
if k * i > n:
	print(k * i - n)
else:
	print(0)


def price(k_i, n):
	k = 0
	for i in range(1, n + 1):
		k += k_i * i
	return k
(k, n, w) = input().split()
x = price(int(k), int(w))
if int(n) > x:
	print(0)
else:
	print(x - int(n))


(k, n, w) = tuple(map(int, input().split()))
i = 1
cost = 0
while w > 0:
	cost += i * k
	i += 1
	w -= 1
print(cost - n) if cost > n else print(0)


x = ['0', '0', '0']
x = input().split()
x[0] = int(x[0])
x[1] = int(x[1])
x[2] = int(x[2])
i = 1
c = 0
while i <= x[2]:
	c += i * x[0]
	i += 1
if c >= x[1]:
	print(c - x[1])
else:
	print(0)


nums = input().split(' ')
k = int(nums[0])
n = int(nums[1])
w = int(nums[2])
total = int(0.5 * w * (w + 1) * k)
if total > n:
	print(total - n)
else:
	print(0)


(k, n, w) = input().split()
sum = 0
for i in range(1, int(w) + 1):
	sum += i * int(k)
if sum > int(n):
	print(sum - int(n))
elif sum <= int(n):
	print('0')


import math
line = input()
args = line.split(' ')
k = int(args[0])
n = int(args[1])
w = int(args[2])
cost = n - (1 + w) * w / 2 * k
if cost >= 0:
	print(0)
else:
	print(int(-cost))


(k, n, w) = map(int, input().split())
totalCost = 0
for i in range(w):
	totalCost += (i + 1) * k
borrow = totalCost - n
if borrow > 0:
	print(borrow)
else:
	print('0')


def main():
	(cost, dolars, number) = input().split()
	cost = int(cost)
	dolars = int(dolars)
	number = int(number)
	sum = 0
	for i in range(1, number + 1):
		sum += i * cost
	need = sum - dolars
	if need <= 0:
		print(0)
	else:
		print(need)
main()


(k, n, w) = [int(x) for x in input().split()]
summa = 0
for i in range(w):
	summa += (i + 1) * k
if summa > n:
	print(abs(summa - n))
else:
	print(0)


(first_banana, money, count) = map(int, input().split())
sum_of_money = first_banana
for i in range(2, count + 1):
	sum_of_money += first_banana * i
if sum_of_money - money > 0:
	print(sum_of_money - money)
else:
	print('0')


(k, n, w) = map(int, input().split())
sm = (k + w * k) * w // 2
print(sm - n if sm > n else 0)


(c, d, n) = map(int, input().split())
cost = 0
for i in range(n):
	x = (i + 1) * c
	cost += x
if cost > d:
	print(cost - d)
else:
	print(0)


na = input().split(' ')
k = int(na[0])
n = int(na[1])
w = int(na[2])
s = 0
for i in range(1, w + 1):
	s += i * k
print(max(s - n, 0))


def solve():
	(k, n, w) = map(int, input().split())
	price = k
	for i in range(2, w + 1):
		price += i * k
	if price > n:
		return price - n
	return 0
print(solve())


(c, a, w) = map(int, input().split())
c1 = 0
for i in range(1, w + 1):
	c1 += c * i
if c1 <= a:
	print(0)
else:
	print(c1 - a)


line = input().split()
data = [int(d) for d in line]
cost = data[0]
money = data[1]
bananas = data[2]
b = 0
for e in range(bananas + 1):
	b += e * cost
if b - money > 0:
	print(b - money)
else:
	print(0)


(k, n, w) = map(int, input().split())
l = w * (w + 1)
m = l / 2
a = int(m)
a *= k
b = a - n
if b > 0:
	print(b)
else:
	print(0)


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest

def binNumber(n, size):
	return bin(n)[2:].zfill(size)

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
(k, n, w) = map(int, input().split())
print(max(w * (w + 1) // 2 * k - n, 0))


def main(k, n, w):
	val = int(k * (w + 1) * (w / 2) - n)
	if val < 0:
		return 0
	return val
(k, n, w) = [int(x) for x in input().split()]
print(main(k, n, w))


def reqd_money(k, n, w):
	sum = 0
	for i in range(1, w + 1):
		sum = sum + k * i
	if sum > n:
		return sum - n
	return 0
(k, n, w) = map(int, input().strip().split(' '))
print(reqd_money(k, n, w))


(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
d = ''
for i in range(1, c):
	d += str(i) + '*' + str(a) + '+'
d += str(c) + '*' + str(a)
if eval(d) - b < 0:
	print(0)
else:
	print(eval(d) - b)


inp = list(map(int, input().split()))
k = inp[0]
n = inp[1]
w = inp[2]
price = 0
for i in range(1, w + 1):
	price = price + i * k
if price - n > 0:
	print(price - n)
else:
	print(0)


values = input().split()
(k, n, w) = (int(values[0]), int(values[1]), int(values[2]))
total_price = w * (w + 1) / 2 * k
difference = n - total_price
if difference >= 0:
	print(0)
else:
	print(int(abs(difference)))


(k, n, w) = map(int, input().strip().split())
m = 0
for a in range(w + 1):
	m = m + a
t = k * m
if n >= t:
	print('0')
else:
	print(t - n)


(price, money, bananas_quantity) = [int(x) for x in input().split(' ')]
need_to_borrow = -(money - sum([price * i for i in range(1, bananas_quantity + 1)]))
if need_to_borrow <= 0:
	print(0)
else:
	print(need_to_borrow)


(k, n, w) = map(int, input().split())
sum = k * ((1 + w) * w // 2)
print([sum - n, 0][n >= sum])


(a, b, c) = list(map(int, input().split()))
sum = 0
for i in range(1, c + 1):
	sum += i * a
print(sum - b) if sum > b else print(0)


def main():
	from sys import stdin, stdout
	(k, n, w) = map(int, stdin.readline().split())
	m = w * (w + 1) * k // 2
	if m <= n:
		stdout.write('0')
	else:
		stdout.write(str(m - n))
main()


li = []
for i in range(1):
	li = [int(num) for num in input().split()]
k = li[0]
n = li[1]
w = li[2]
s = 0
for i in range(1, w + 1):
	x = k * i
	s = s + x
l = s - n
if l < 0:
	print(0)
else:
	print(l)


(cost, money, number_of_bananas) = map(int, input().split())
total_cost = cost * (number_of_bananas * (number_of_bananas + 1)) // 2
print(total_cost - money) if total_cost > money else print(0)


def solder(k, n, w):
	total = 0
	for i in range(w):
		total = total + (i + 1) * k
	if n > total:
		return 0
	return total - n
(k, n, w) = map(int, input().split())
print(solder(k, n, w))


x = list(map(int, input().split()))
c = 0
for i in range(1, x[2] + 1):
	c += x[0] * i
if x[1] >= c:
	print('0')
else:
	print(c - x[1])


(price, money, number) = map(int, input().split())
total_price = 0
for i in range(1, number + 1):
	total_price += i * price
if total_price > money:
	print(total_price - money)
else:
	print(0)


x = list(map(int, input().split(' ')))
a = 0
for i in range(1, x[2] + 1):
	a += x[0] * i
if x[1] - a > 0:
	print(0)
else:
	print(abs(x[1] - a))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
if k >= 1 and 0 <= w <= 1000 and (0 <= n <= 10 ** 9):
	s = 0
	i = 1
	while i <= w:
		s += i * k
		i += 1
	if s > n:
		print(s - n)
	else:
		print('0')


a = [int(x) for x in input().split()]
total = a[2] * (a[2] + 1) // 2 * a[0]
s = 0
if total > a[1]:
	s = total - a[1]
print(s)


l = input()
list = l.split()
k = int(list[0])
n = int(list[1])
w = int(list[2])
cost = 0
for i in range(w):
	cost = cost + (i + 1) * k
if cost - n > 0:
	print(abs(cost - n))
else:
	print('0')


(k, n, w) = [int(s) for s in input().split()]
itog = 0
for i in range(1, w + 1):
	itog += k * i
if n - itog < 0:
	print(abs(n - itog))
else:
	print(0)


(k, n, w) = input().split(' ')
k = int(k)
n = int(n)
w = int(w)
i = 1
b = 0
while i <= w:
	b = b + i * k
	i = i + 1
if b >= n:
	c = b - n
else:
	c = 0
print(c)


list = input().split(' ')
money = int(list[0]) * (1 + int(list[2])) * int(list[2]) // 2
if money > int(list[1]):
	print(money - int(list[1]))
else:
	print(0)


(a, b, c) = map(int, input().split())
s = a
q = a
i = 2
while c > 1:
	s = s + q * i
	c = c - 1
	i += 1
if s - b > 0:
	print(s - b)
else:
	print('0')


def k_bananas(k, n, w):
	(su, i) = (0, 1)
	while w > 0:
		su += i * k
		i += 1
		w -= 1
	if n > su:
		print(0)
	else:
		print(abs(su - n))
(k, n, w) = map(int, input().split(' '))
k_bananas(k, n, w)


from math import ceil
(k, n, w) = (int(x) for x in input().split())
d = ceil((2 * k + k * (w - 1)) / 2 * w)
print(d - n if d > n else 0)


a = [int(x) for x in input().split()]
i = a[0]
j = a[1]
k = a[2]
z = 0
for y in range(k):
	z = z + (y + 1) * i
if j - z < 0:
	print(z - j)
elif j - z >= 0:
	print(0)


s = list(map(int, input().split()))
sum = s[2] * (s[2] + 1) * s[0]
sum = sum // 2
if sum - s[1] >= 0:
	print(sum - s[1])
else:
	print('0')


input_data = input()
list_we_use = input_data.split(' ')
c = []
s = 0
f = 0
for i in list_we_use:
	c.append(int(i))
f = c[2]
for i in range(1, f + 1):
	s += i * c[0]
if c[1] >= s:
	print(0)
else:
	print(s - c[1])


(zcenaBanana, dengi, kolvo) = map(int, input().split())
summa = 0
for i in range(1, kolvo + 1):
	summa = summa + zcenaBanana * i
if dengi >= summa:
	print('0')
else:
	print(summa - dengi)


values = list(map(int, input().split()))
first_banana = values[0]
dollars = values[1]
bananas = values[2]
price = 0
for i in range(1, bananas + 1):
	price = price + i * first_banana
required = price - dollars
if required >= 0:
	print(required)
else:
	print(0)


ch = input().split()
j = 0
for i in range(1, int(ch[2]) + 1):
	j += i
if j * int(ch[0]) >= int(ch[1]):
	print(j * int(ch[0]) - int(ch[1]))
else:
	print(0)


(init_cost, init_money, no_of_bananas) = map(int, input().split())
tot_payable = 0
for i in range(1, no_of_bananas + 1):
	tot_payable += i * init_cost
if tot_payable > init_money:
	print(tot_payable - init_money)
else:
	print(0)


a = list(map(int, input().split()))
ans = a[1] - a[0] * (a[2] * (a[2] + 1)) / 2
if ans > 0:
	ans = 0
print(-1 * int(ans))


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
(k, n, w) = invr()
for i in range(1, w + 1):
	n -= i * k
if n >= 0:
	print(0)
else:
	print(abs(n))


soldier = input().split()
cost = int(soldier[0])
dollars = int(soldier[1])
bananas = int(soldier[2])
bananas_no = 0
b_list = []
total_cost = []
no_cost = 0
while bananas > bananas_no:
	bananas_no += 1
	b_list.append(bananas_no)
for x in b_list:
	formula = x * cost
	total_cost.append(formula)
total = 0
for d in total_cost:
	total += int(d)
c = total - dollars
if c > 0:
	print(c)
elif c < 0:
	print(no_cost)
else:
	print(no_cost)


Raw = input()
Its = Raw.split(' ')
K = int(Its[0])
N = int(Its[1])
W = int(Its[2])
print(int(max(0, W * (W + 1) / 2 * K - N)))


[k, n, w] = [int(a) for a in input().split(' ')]
count = 0
multiply = 1
sum = 0
while count < w:
	p = k * multiply
	count += 1
	multiply += 1
	sum = p + sum
d = sum - n
if d > 0:
	print(d)
else:
	print(0)


from math import floor
s = input().split()
k = int(s[0])
n = int(s[1])
w = int(s[2])
tot = (w + 1) * floor(w / 2)
if w % 2:
	tot += (w + 1) / 2
ans = k * tot - n
if ans < 0:
	ans = 0
print(int(ans))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
m = (k + w * k) * w / 2
if m > n:
	print(int(m - n))
else:
	print(0)


a = list(map(int, input().split()))
x = []
for i in range(a[2] + 1):
	c = a[0] * i
	x.append(c)
q = sum(x)
k = q - a[1]
if k > 0:
	print(k)
else:
	print(0)


(a, b, c) = [int(x) for x in input().split()]
print(max(0, int(a * (c + 1) * c / 2 - b)))


def bananas(tasty, dollar, bnns):
	dollars = 0
	for c in range(1, bnns + 1):
		dollars += tasty * c
	dollars = dollars - dollar
	if dollars <= 0:
		return 0
	return dollars
(tasty, money, bnns) = map(int, input().split())
if bnns == 0:
	print(bnns)
else:
	print(bananas(tasty, money, bnns))


s = input('')
input_list = s.split(' ')
values = [int(x.strip()) for x in input_list]
orginal_price = values[0]
money_you_have = values[1]
bananas_you_want = values[2]
price_increase = 1
Total_Cost_local = 0
Total_Cost_global = 0
for x in range(bananas_you_want):
	Total_Cost_local = orginal_price * price_increase
	price_increase += 1
	Total_Cost_global = Total_Cost_global + Total_Cost_local
if Total_Cost_global - money_you_have < 0:
	print('0')
else:
	print(Total_Cost_global - money_you_have)


(k, n, w) = list(map(int, input().split()))
price = 0
for i in range(1, w + 1):
	p = k * i
	price += p
borrow = price - n
if n >= price:
	print('0')
else:
	print(borrow)


import sys
line = sys.stdin.readline()
while line:
	(k, n, w) = [int(x) for x in line.split()]
	total_price = sum([k * i for i in range(1, w + 1)])
	print(max(0, total_price - n))
	line = sys.stdin.readline()


s = input().split()
t = 0
w = int(s[2])
for i in range(int(s[2])):
	t += int(s[0]) * w
	w -= 1
if t - int(s[1]) > 0:
	print(t - int(s[1]))
else:
	print(0)


from sys import stdin
_input = stdin.readline
(_range, _int, _list, _sum) = (range, int, list, sum)

def solution():
	(k, n, w) = [_int(i) for i in _input().split()]
	ans = _sum(_list(_range(1, w + 1))) * k - n
	if ans < 0:
		print(0)
	else:
		print(ans)
solution()


(k, n, w) = input().split()
total = 0
k = int(k)
n = int(n)
w = int(w)
for each in range(0, w + 1):
	total += each * k
value = int(total - n)
if value < 0:
	print(0)
else:
	print(value)


(r, m, b) = map(int, input().split())
sum = 0
for i in range(1, b + 1):
	c = r * i
	sum = sum + c
if sum < m:
	print(0)
else:
	t = sum - m
	print(t)


a = input().split()
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
money = 0
for i in range(1, a[2] + 1):
	money = money + i * a[0]
if a[1] >= money:
	print(0)
else:
	print(money - a[1])


(a, b, c) = input('').split(' ')
k = int(a)
n = int(b)
w = int(c)
p = 0
for j in range(1, w + 1):
	p = p + j * k
if p - n > 0:
	print(p - n)
else:
	print(0)


a = input()
d = int(a.split(' ')[0])
n = int(a.split(' ')[1])
w = int(a.split(' ')[2])
s = (d + w * d) * w // 2
if s > n:
	print(s - n)
else:
	print(0)


(a, b, c) = map(int, input().split())
sum1 = c * (c + 1) / 2
price = sum1 * a
if price <= b:
	print(0)
else:
	print(int(price - b))


a = str(input())
a1 = a.split(' ')
k = int(a1[0])
n = int(a1[1])
w = int(a1[2])
v = 0
while w != 0:
	v = w * k + v
	w -= 1
if n >= v:
	print(0)
elif v > n:
	print(v - n)


l = list(map(int, input().strip().split()))
x = [i * l[0] for i in range(1, l[2] + 1)]
if l[1] >= sum(x):
	print('0')
else:
	print(abs(sum(x) - l[1]))


def solve(k, n, w):
	tot = w * (w + 1) * k / 2
	return int(max(tot - n, 0))
inp = input().split(' ')
print(solve(int(inp[0]), int(inp[1]), int(inp[2])))


__author__ = 'yarsanich'
(k, n, w) = map(int, input().split())
x = 0
for i in range(w):
	x += k * (i + 1)
if n >= x:
	print(0)
else:
	print(x - n)


(n, a, b) = map(int, input().split())
sum = 0
for i in range(1, b + 1):
	sum = sum + n * i
if sum > a:
	print(sum - a)
else:
	print(0)


(k, n, w) = map(int, input().split())
value = 0
for i in range(w + 1):
	value += k * i
print(max(0, value - n))


(fiyati, parasi, istedigi) = map(int, input().split())
jemi = 0
for i in range(1, istedigi + 1):
	jemi = jemi + i * fiyati
borc = jemi - parasi
if borc < 0:
	borc = 0
print(borc)


from sys import stdin

def formula(n, k):
	g = n * (n + 1) / 2
	return k * g

def main():
	(k, n, w) = [int(i) for i in stdin.readline().strip().split()]
	g = formula(w, k)
	g = g - n
	if g <= 0:
		print(0)
	else:
		print(int(g))
main()


x = 0
(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
for o in range(1, w + 1):
	x = k * o + x
m = x - n
if m < 0:
	m = 0
print(m)


(price, balance, quantity) = list(map(int, input().split()))
payment = 0
for i in range(1, quantity + 1):
	payment += i * price
if payment - balance <= 0:
	print(0)
else:
	print(payment - balance)


x = input().split(' ')
k = float(x[0])
n = int(x[1])
w = int(x[2])
total_cost = 0.5 * w * (w + 1) * k
if total_cost - n > 0:
	print(int(total_cost - n))
else:
	print('0')


(first_banana, pocket, bananas) = [int(x) for x in input().split()]
total_price = 0
for i in range(bananas + 1):
	total_price += i * first_banana
loan = pocket - total_price
if loan >= 0:
	loan = 0
print(abs(loan))


(k, n, w) = map(int, input().split())
sum = w * (w + 1) // 2
answer = sum * k - n
if answer > 0:
	print(answer)
elif answer <= 0:
	print(0)


init = input()
init = init.split()
BananaCost = int(init[0])
Money = int(init[1])
Required = int(init[2])
totalcost = 0
for i in range(Required + 1):
	totalcost += BananaCost * i
if totalcost - Money < 0:
	print(0)
else:
	print(totalcost - Money)


(x, y, z) = map(int, input().split())
p = 0
for i in range(z + 1):
	p += x * i
sol = p - y
if sol >= 0:
	print(sol)
else:
	print(0)


(a, b, c) = map(int, input().split())
k = c * (c + 1) / 2
s = int(k * a - b)
if s < 0:
	s = 0
print(s)


num = list(map(int, input().rstrip().split()))
k = num[0]
n = num[1]
w = num[2]
sum = 0
for i in range(1, w + 1):
	sum += i * k
if sum >= n:
	print(sum - n)
else:
	print('0')


(x1, x2, x3) = input().split()
dollarsneed = 0
for i in range(1, eval(x3) + 1):
	dollarsneed += eval(x1) * i
answer = dollarsneed - eval(x2)
if answer > 0:
	print(answer)
else:
	print(0)


(k, n, w) = (int(i) for i in input().split())
m = (w + 1) * w / 2
mk = int(m * k)
print(max(mk - n, 0))


(k, n, w) = input().split()
a = 1
z = 0
while a <= int(w):
	z = z + a * int(k)
	a = a + 1
if z - int(n) > 0:
	print(z - int(n))
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
m = 0
for i in range(w):
	m += (i + 1) * k
b = m - n
if b >= 0:
	print(b)
else:
	print(0)


inp = input().split(' ')
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
cost = 0
for i in range(1, w + 1):
	cost = cost + i * k
amount_needed = cost - n
if amount_needed <= 0:
	amount_needed = 0
print(amount_needed)


angka = [int(x) for x in input().split()]
hasil = 0
for i in range(1, angka[2] + 1):
	hasil += angka[0] * i
total = hasil - angka[1]
if total < 0:
	print(0)
else:
	print(total)


knw = list(map(int, input().split()))
ris = 0
for x in range(1, knw[2] + 1):
	ris += knw[0] * x
if ris - knw[1] > 0:
	print(ris - knw[1])
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
c = 0
for i in range(w):
	c += (i + 1) * k
o = c - n
if o >= 0:
	print(o)
else:
	print(0)


l = list(map(int, input().split()))
(k, n, w) = (l[0], l[1], l[2])
c = k * (w * (w + 1) // 2)
if c > n:
	print(c - n)
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
dollarsHave = n
costFirst = k
howMany = w
lastCost = k + (w - 1) * k
total = (k + lastCost) * w / 2
if dollarsHave >= total:
	print(0)
else:
	print('%d' % (total - dollarsHave))


def main():
	(k, n, w) = map(int, input().split())
	price = (k + w * k) * (w / 2)
	if price > n:
		print(int(price - n))
	else:
		print(0)
main()


def f(lst):
	price = lst[0]
	money = lst[1]
	amount = lst[2]
	total = 0
	for i in range(int(amount + 1)):
		s = price * i
		total = total + s
	if total - money < 0:
		return 0
	return total - money
print(f(list(map(int, input().split()))))


(k, n, w) = [int(i) for i in input().split()]
lst = []
(s, r) = (0, 0)
for (i, j) in enumerate(range(w), start=1):
	s = s + i * k
if s > n:
	r = int(s - n)
print(r)


(k, h, b) = map(int, input().split())
tot = 0
for i in range(b + 1):
	tot += k * i
if h > tot:
	print(0)
else:
	print(tot - h)


(k, n, w) = map(int, input().split())
price = 0
for i in range(w):
	price += k + k * i
money = n - price
if money > 0:
	print(0)
else:
	print(abs(money))


(cost, initial, number) = map(int, input().split())
Sum = 0
for x in range(1, number + 1):
	Sum += cost * x
if Sum <= initial:
	print(0)
else:
	print(Sum - initial)


(k, n, w) = map(int, input().split())
l = []
for i in range(1, w + 1):
	l.append(i)
p = 0
for ele in range(0, len(l)):
	p = p + l[ele]
r = p * k - n
if r > 0:
	print(r)
else:
	print('0')


(k, n, w) = map(int, input().split())
total_money_needed = w * (w + 1) * k / 2
borrow_needed = total_money_needed - n
if borrow_needed < 0:
	print('0')
else:
	print(int(borrow_needed))


(k, n, w) = map(int, input().split())
f = (1 + w) / 2 * w * k
print(int((f > n) * (f - n)))


(k, n, w) = input().split()
w1 = int(w)
x = int(int(k) * w1 * (w1 + 1) / 2 - int(n))
if x > 0:
	print(x)
else:
	print(0)


list1 = input().split()
list1[0] = int(list1[0])
list1[1] = int(list1[1])
list1[2] = int(list1[2])
sum = 0
for i in range(list1[2]):
	sum += i + 1
sum *= list1[0]
number = sum - list1[1]
if number < 0:
	number = 0
print(number)


nkw = list(map(int, input().split()))
k = nkw[0]
n = nkw[1]
w = nkw[2]
sum1 = 0
for i in range(1, w + 1):
	sum1 += i * k
if sum1 > n:
	print(sum1 - n)
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
c = (w * k + k) * w / 2
if c - n >= 0:
	print(int(c - n))
else:
	print(0)


char1 = ''
char1 = char1 + input()
list1 = char1.split(' ')
list2 = []
for n in list1:
	list2.append(int(n))
sum1 = list2[2] / 2 * (2 * list2[0] + (list2[2] - 1) * list2[0])
if int(sum1) > list2[1]:
	print(int(sum1) - list2[1])
else:
	print(0)


(a, b, c) = map(int, input().split())
t = 0
for i in range(c + 1):
	z = a * i
	t = z + t
ans = t - b
if ans >= 1:
	print(ans)
else:
	print(0)


a = input().split()
print(max(0, int(a[2]) * (int(a[2]) + 1) // 2 * int(a[0]) - int(a[1])))


(cost, ruppes, amount) = map(int, input().split())
sum = 0
for i in range(1, amount + 1):
	sum = sum + cost * i
if ruppes >= sum:
	print('0')
else:
	print(sum - ruppes)


import sys
line = sys.stdin.readline()
while line:
	(k, n, w) = line.split()
	k = int(k)
	n = int(n)
	w = int(w)
	tot = 0
	cost = k
	for i in range(w):
		tot += (i + 1) * cost
	borrow = int((1 + w) * (w * k / 2)) - n
	if borrow < 0:
		borrow = 0
	print(borrow)
	line = sys.stdin.readline()


input_s = input().split(' ')
k = int(input_s[0])
n = int(input_s[1])
w = int(input_s[2])
m = 0
if w % 2 == 0:
	m = (w + 1) * w / 2
else:
	m = w * (w - 1) / 2 + w
mk_n = m * k - n
if mk_n >= 0:
	print('%d' % mk_n)
else:
	print(0)


x = [int(i) for i in input().split()]
y = x[0] * x[2] * (x[2] + 1) // 2 - x[1]
print(y if y > 0 else 0)


(cost, budget, n) = list(map(int, input().split()))[:]
m = cost * (n * (n + 1)) / 2
if m >= budget:
	print(int(m - budget))
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
suma = 0
for i in range(w):
	suma += i + 1
suma *= k
if n >= suma:
	n = suma
print(suma - n)


def soldier():
	a = input()
	b = a.split(' ')
	(price, got, num) = (int(b[0]), int(b[1]), int(b[2]))
	pay = 0
	for i in range(1, num + 1):
		pay += i * price
	if pay < got:
		print(0)
	else:
		print(pay - got)
soldier()


(a, b, c) = [int(x) for x in input().split(' ')]
if c * (c + 1) / 2 * a <= b:
	print('0')
else:
	print(int(c * (c + 1) / 2 * a - b))


def main():
	(k, n, w) = list(map(int, input().rstrip().split()))
	total = (1 + w) * w // 2 * k
	print(max(0, total - n))
main()


s = input().split()
ans = 0
a1 = int(s[0])
an = (int(s[2]) - 1) * a1 + int(s[0])
sn = (a1 + an) / 2 * int(s[2])
ans = int(sn - int(s[1]))
print('0' if ans < 0 else ans)


import math as m
arr = list(map(int, input().split()))
k = arr[0]
n = arr[1]
w = arr[2]
x = k * w * (w + 1) / 2
y = x - n
z = m.ceil(y)
if z <= 0:
	print('0')
else:
	print(z)


inp = list(map(int, input().split()))
pay = 0
for i in range(1, inp[2] + 1):
	pay += inp[0] * i
if inp[1] >= pay:
	print(0)
else:
	print(pay - inp[1])


import sys
n = 0
for l in sys.stdin:
	for k in l.split():
		if n == 0:
			ek = int(k)
		elif n == 1:
			en = int(k)
		elif n == 2:
			ew = int(k)
		n = n + 1
	break
finish = 0
cost = 0
loop = 1
while ew > 0:
	cost = cost + ek * loop
	ew = ew - 1
	loop = loop + 1
if cost > en:
	finish = cost - en
print(finish)


def solve(arr):
	first = arr[0]
	has_h = arr[1]
	many_bn = arr[2]
	tot = 0
	for i in range(1, many_bn + 1):
		tot += i * first
	if tot - has_h <= 0:
		print(0)
	else:
		print(tot - has_h)
arr = list(map(int, input().split()))
solve(arr)


(k, n, w) = [int(x) for x in input().split()]
total = k * (w * (w + 1) // 2)
if total > n:
	borrow = abs(n - total)
	print(borrow)
else:
	print('0')


def sb(k, n, w):
	totalMoneyNeeded = w * (w + 1) * k / 2
	return max(totalMoneyNeeded - n, 0)
(k, n, w) = map(int, input().split())
x = sb(k, n, w)
print(int(x))


inputArray = input().split(' ')
d = int(inputArray[0])
amount = int(inputArray[1])
n = int(inputArray[2])
sum = n / 2 * (2 * d + (n - 1) * d)
if round(sum - amount) > 0:
	print(round(sum - amount))
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
cost = 0
15
for i in range(1, w + 1):
	cost += i * k
if cost > n:
	print(cost - n)
else:
	print(0)


(cost, wallet, bananas) = map(int, input().split())
total_cost = sum([i * cost for i in range(1, bananas + 1)]) - wallet
print(total_cost if total_cost >= 0 else 0)


(k, n, w) = map(int, input().split())
b = k * (w * (w + 1) / 2)
if n > b:
	n = b
print(int(b - n))


(price, have_money, to_buy_cnt) = map(int, input().split())
cur_price = price
to_pay = 0
for i in range(to_buy_cnt):
	to_pay += cur_price
	cur_price += price
to_lend = to_pay - have_money
print(max(0, to_lend))


def sum(k, n):
	total = 0
	for i in range(n):
		total = total + k * (i + 1)
	return total
(k, w, n) = input().split()
k = int(k)
w = int(w)
n = int(n)
b = sum(k, n) - w
if b > 0:
	print(b)
else:
	print(0)


sum_ = 0
nana = input().split()
k = int(nana[0])
n = int(nana[1])
w = int(nana[2])
for i in range(1, w + 1):
	sum_ = sum_ + i * int(k)
if n >= sum_:
	print(0)
else:
	print(sum_ - n)


import sys
R = lambda : list(map(int, input().split()))
(k, n, w) = R()
t = (1 + w) * w // 2 * k
if t <= n:
	print(0)
else:
	print(t - n)


(k, n, w) = list(map(int, input().strip().split()))
z = w * k * (w + 1) / 2
if z < n:
	print(0)
else:
	print(int(z - n))


import math
(k, n, w) = map(lambda x: int(x), input().split())
b = math.ceil((1 + w) * w * k / 2 - n)
print(b if b > 0 else 0)


(k, n, w) = tuple(map(lambda x: int(x) if x != '' else None, input().split(' ')))
print((lambda x: 0 if x <= 0 else x)(k * w * (w + 1) // 2 - n))


def self():
	(k, n, w) = map(int, input().split())
	if k * (w * (w - 1) // 2) - n + w * k < 0:
		print(0)
	else:
		print(k * (w * (w - 1) // 2) - n + w * k)
self()


def bananas(n):
	return n * (n + 1) / 2
(x, y, z) = map(int, input().split())
bananas = bananas(z)
total_money = bananas * x
borrow = total_money - y
if borrow <= 0:
	print(0)
else:
	print(int(borrow))


(preco, qnt, quantidade) = map(int, input().split())
eq = 0
eq2 = 0
for x in range(quantidade + 1):
	eq = eq + preco * x
eq2 = eq - qnt
if eq2 < 0:
	eq2 = 0
print(eq2)


def bananas():
	arr = list(map(int, input().split()))[:3]
	k = arr[0]
	n = arr[1]
	w = arr[2]
	sum = 0
	for i in range(w + 1):
		sum += k * i
	if sum >= n:
		print(sum - n)
	else:
		print('0')
bananas()


(k, n, w) = list(map(int, input().split()))
l1 = []
for i in range(1, w + 1):
	c = k * i
	l1.append(c)
if sum(l1) > n:
	print(abs(n - sum(l1)))
else:
	print('0')


num = input().split()
p = 0
for i in range(1, int(num[2]) + 1):
	p += i * int(num[0])
if p > int(num[1]):
	print(p - int(num[1]))
else:
	print('0')


(k, n, w) = map(int, input().split())
t = n - w * (1 + w) * k // 2
if t >= 0:
	print(0)
else:
	print(abs(t))


(k, n, w) = map(int, input().split())
price = (k + k * w) * w // 2
print(max(0, price - n))


input_data = input()
list = input_data.split()
w = int(list[2])
n = int(list[1])
k = int(list[0])
price = 0
for i in range(w + 1):
	price = price + i * k
answer = price - n
if answer > 0:
	print(answer)
else:
	print('0')


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
k = sum(range(c + 1))
if a * k - b > 0:
	print(a * k - b)
else:
	print(0)


import sys

def solve():
	(k, n, w) = map(int, input().split())
	need = w * (w + 1) // 2 * k
	ans = max(need - n, 0)
	print(ans)
solve()


(k, n, w) = list(map(int, input().strip().split(' ')))
print(-min(0, int(n - w * (w + 1) * k // 2)))


[k, n, w] = [int(_) for _ in input().split()]
print(max(0, k * w * (w + 1) // 2 - n))


(k, n, w) = map(int, input().split())
li = []
for i in range(w):
	li.append(i + 1)
s = sum(li)
t = k * s
r = t - n
if r < 0:
	print(0)
else:
	print(r)


(k, n, w) = map(int, input().split())
plusk = k
ans = 0
for i in range(w):
	ans += k
	k += plusk
if ans - n > 0:
	print(ans - n)
else:
	print(0)


(K, N, W) = input().split(' ')
K = int(K)
N = int(N)
W = int(W)
cost = int(K * W * (W + 1) / 2)
if cost > N:
	print(cost - N)
else:
	print(0)


a = list(map(int, input().split()))
x = [l * a[0] for l in range(1, a[2] + 1)]
if sum(x) == a[1] or a[1] > sum(x):
	print(0)
else:
	print(sum(x) - a[1])


(k, n, w) = map(int, input().split())
x = 0
res = 0
for i in range(1, w + 1):
	x += k * i
res = max(0, x - n)
print(res)


q = input('').split(' ')
(k, n, w) = (int(q[0]), int(q[1]), int(q[2]))
suma = 0
for i in range(1, w + 1):
	suma += i * k
answer = suma - n
if answer < 0:
	print(0)
else:
	print(answer)


a = list(map(int, input().split()))
cost = a[0]
money = a[1]
no = a[-1]
sums = int(no * (no + 1) / 2 * cost - money)
if sums > 0:
	print(sums)
else:
	print(0)


a = list(map(int, input().split()))
k = a[0]
n = a[1]
w = a[2]
ans = 0
for i in range(1, w + 1):
	ans += i
if n > k * ans:
	print(0)
else:
	print(k * ans - n)


a = input().split()
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
k = (a[0] + a[0] * (a[2] - 1) / 2) * a[2]
if a[1] - k < 0:
	z = k - a[1]
else:
	z = 0
print(int(z))


(k, c, n) = [int(x) for x in input().split()]
t = 0
for i in range(n):
	t = t + k * i
j = i + 1
t = t + k * j
if t > c:
	print(t - c)
else:
	print('0')


(x, y, z) = map(int, input().split())
s = x * (z * (z + 1) // 2)
if y > s:
	print('0')
else:
	print(s - y)


(k, n, m) = map(int, input().split())
some = 0
for i in range(1, m + 1):
	some += i * k
if n > some:
	print('0')
else:
	print(some - n)


try:
	while True:
		(k, n, w) = map(int, input().split())
		ans = 0
		for i in range(1, w + 1):
			ans += i * k
		if n >= ans:
			print(0)
		else:
			print(ans - n)
except:
	pass


def main():
	(k, n, w) = map(int, input().split())
	value = 0
	j = 1
	for i in range(w):
		value = value + j * k
		j += 1
	if value <= n:
		print(0)
	else:
		print(value - n)
main()


str1 = input()
list1 = str1.split(' ')
k = int(list1[0])
n = int(list1[1])
w = int(list1[2])
m = k * (w + 1) * w / 2

def f(x, y):
	if x > y:
		return x - y
	else:
		return 0
print(int(f(m, n)))


a = list(map(int, input().split()))
c = a[0]
total = 0
for i in range(a[2]):
	total += c
	c += a[0]
ans = total - a[1]
if ans > 0:
	print(ans)
else:
	print('0')


(k, n, w) = list(map(int, input().split()))
s = 0
for i in range(1, w + 1):
	s += k * i
if s - n <= 0:
	print(0)
	quit()
print(s - n)


def banany(k, n, w):
	wynik = 0
	for i in range(1, w + 1):
		wynik += k * i
	if wynik < n:
		return 0
	return wynik - n
(k, n, w) = map(int, input().split())
print(banany(k, n, w))


origin = input().split()
k = int(origin[0])
n = int(origin[1])
w = int(origin[2])
expense = k * w * (w + 1) // 2
if n >= expense:
	debt = 0
else:
	debt = expense - n
print(debt)


(k, n, w) = [int(x) for x in input().split()]

def fun(k, n, w):
	sum = 0
	for i in range(1, w + 1):
		sum += i * k
	ans = sum - n
	if ans > 0:
		return print(ans)
	else:
		return print(0)
fun(k, n, w)


(k, n, w) = map(int, input().split())
tm = w * k * (1 + w) / 2
b = int(tm - n)
if b > 0:
	print(b)
elif b <= 0:
	print('0')


a = input().split()
k = eval(a[0])
n = eval(a[1])
w = eval(a[2])
s = w * (1 + w) * k / 2
if n >= s:
	print(0)
else:
	print('{:.0f}'.format(s - n))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
t = 0
s = 0
for item in range(w):
	t += 1
	s += k * t
if s <= n:
	print(0)
else:
	print(s - n)


j = [int(i) for i in input().split()]
k = int(j[0])
n = int(j[1])
w = int(j[2])
summ = 0
stban = k
for i in range(1, w + 1):
	summ += stban * i
zanyat = summ - n
if zanyat < 0:
	print(0)
else:
	print(summ - n)


(a, b, c) = [int(i) for i in input().split()]
d = 0
for m in range(1, c + 1):
	d += m
print(max(a * d - b, 0))


(k, n, w) = map(int, input().split(' '))
tot = 0
for i in range(w):
	tot = tot + (i + 1) * k
	i = i + 1
tot = tot - n
if tot < 0:
	tot = 0
print(tot)


(a, b, c) = map(int, input().split())

def f(x):
	return a * x * (x + 1) // 2
m = f(c)
if m > b:
	print(int(f(c) - b))
else:
	print(0)


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
total = 0
for i in range(1, w + 1):
	money = i * k
	total = total + money
borrow = total - n
if borrow < 0:
	borrow = 0
print(borrow)


(k, n, w) = map(int, input().split())
price = 0
for i in range(1, w + 1):
	price += i * k
pay = price - n
if pay >= 0:
	print(pay)
else:
	print(0)


s = input().split()
m = int(s[0]) * (1 + int(s[2])) * int(s[2]) / 2 - int(s[1])
if m > 0:
	print('%d' % m)
else:
	print('0')


abc = input().split()
a = int(abc[0])
b = int(abc[1])
c = int(abc[2])

def gaussSolve(n):
	return int(n / 2 * (n + 1))
price = a * gaussSolve(c)
borrow = price - b
if borrow <= 0:
	print(0)
else:
	print(borrow)


(k, n, w) = [int(_) for _ in input().split()]
tot = w * (w + 1) // 2
tot = n - tot * k
if tot > 0:
	print(0)
else:
	print(abs(tot))


arr = input().split(' ')
k = int(arr[0])
n = int(arr[1])
w = int(arr[2])
total_price = 0

def recursive(actual, fix, limit):
	if actual == limit:
		return actual * fix
	else:
		return actual * fix + recursive(actual + 1, fix, limit)
money_to_borrow = recursive(1, k, w) - n
print(0 if money_to_borrow <= 0 else money_to_borrow)


(a1, a2, n) = map(int, input().split(' '))
d = a1
Sn = a1 * n + n * (n - 1) * d / 2
k = 0
if Sn > a2:
	k = Sn - a2
	print(int(k))
else:
	print(0)


(k, w, n) = input('').split()
(k, w, n) = (int(k), int(w), int(n))
sumn = 0
costb = 1
for i in range(n + 1):
	sumn = sumn + i
costb = sumn * k
if w < costb:
	print(costb - w)
else:
	print(0)


nss = input().split(' ')
bill = 0
for i in range(1, int(nss[-1]) + 1):
	bill += int(nss[0]) * i
if int(nss[1]) <= bill:
	print(bill - int(nss[1]))
else:
	print(0)


def calBorrow(k, n, w):
	bill = k * w * (w + 1) / 2
	borrow = bill - n
	if borrow < 0:
		return int(0)
	else:
		return int(borrow)
inp = list(map(int, input().split()))
print(calBorrow(inp[0], inp[1], inp[2]))


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
c = 0
b = 0
for i in range(0, w):
	b += 1
	c = c + b * k
d = c - n
if d <= 0:
	print('0')
else:
	print(d)


(cost, money, no) = map(int, input().split())
total = 0
for i in range(no + 1):
	total += i * cost
ans = total - money
if ans > 0:
	print(ans)
else:
	print(0)


args = input()
(cost, cash, amount) = args.split(' ')
cost = int(cost)
cash = int(cash)
amount = int(amount)
a = sum(range(amount + 1))
total = a * cost - cash
if total <= 0:
	print(0)
else:
	print(total)


def needed_money(k, w):
	return int(k * w * (w + 1) / 2)
(k, n, w) = [int(x) for x in input().split(' ')]
costs = needed_money(k, w)
if costs > n:
	print(costs - n)
else:
	print(0)


s = list(map(int, input().split(' ')))
cost = s[0] * (s[2] / 2) * (s[2] + 1)
print(int(max(0, cost - s[1])))


(k, m, w) = map(int, input().split())
if w == 1:
	w = 1
z = k * (w * (1 + w) // 2)
if z > m:
	print(z - m)
else:
	print(0)


(k, n, d) = map(int, input().split())
print(max(k * d * (d + 1) // 2 - n, 0))


s = input().split()
n = int(s[1]) - (1 + int(s[2])) * int(s[0]) * int(s[2]) // 2
print(0 if n >= 0 else abs(n))


(a, b, c) = map(int, input().split())
d = 0
n = 1
h = a
for i in range(c):
	a = h * n + d
	n += 1
	d = a
if a <= b:
	print(0)
else:
	print(a - b)


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [input() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [int(input()) for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def solve():
	(K, N, W) = Scanner.map_int()
	s = W * (W + 1) // 2 * K
	print(max(0, s - N))

def main():
	solve()
main()


inps = list(map(int, input().split()))

def alls(x):
	if x == 1:
		return 1
	return x * (x + 1) // 2
price = alls(inps[2]) * inps[0] - inps[1]
if price < 0:
	price = 0
print(price)


(k, n, w) = map(lambda x: int(x), input().split())
s = (k + w * k) / 2 * w
d = s - n if s > n else 0
print(int(d))


(x, y, z) = map(int, input().split())
soma = 0
for i in range(1, z + 1):
	soma += x * i
valor = soma - y
if valor > 0:
	print(valor)
else:
	print(0)


(k, n, w) = map(int, input().split())
r = 0
for i in range(w):
	s = (i + 1) * k
	r += s
print(max(0, r - n))


def solution():
	(k, n, w) = (int(i) for i in input().split(' '))
	s = 0
	for i in range(w + 1):
		s += k * i
	s = s - n
	if s > 0:
		print(s)
	else:
		print(0)
solution()


lst = [int(x) for x in input().split()]
k = lst[0]
n = lst[1]
w = lst[2]
totalCost = 0
for i in range(w):
	currentCost = k * (i + 1)
	totalCost += currentCost
borrowCount = totalCost - n
if borrowCount > 0:
	print(borrowCount)
else:
	print(0)


k_n_w = input().split(' ')
k = int(k_n_w[0])
n = int(k_n_w[1])
w = int(k_n_w[2])
banana_price = w * (w + 1) * (k / 2)
answer = banana_price - n
if answer > 0:
	print(int(answer))
else:
	print(0)


def funct(x, n):
	ret = 0
	for count in range(int(n) + 1):
		ret += x * count
	return ret
i = input().split()
cost = funct(int(i[0]), int(i[2]))
if int(cost) > int(i[1]):
	print(int(cost) - int(i[1]))
else:
	print(0)


(k, m, v) = map(int, input().split())
print(max(0, v * (v + 1) * k // 2 - m))


data = input()
values = data.split(' ')
k = int(values[0])
n = int(values[1])
w = int(values[2])
counter = 0
for i in range(1, w + 1):
	counter = counter + i * k
borrow = counter - n
if borrow < 0:
	borrow = 0
print(borrow)


import os
import sys
from io import BytesIO, IOBase

def main():
	(k, n, w) = [str(x) for x in input().split()]
	n = int(n)
	k = int(k)
	w = int(w)
	req = 0
	for i in range(1, w + 1):
		req += i * k
	val = req - n
	if val < 0:
		val = 0
	print(val)
main()


(k, n, w) = map(int, input().split(' '))
y = 0
for a in range(1, w + 1):
	y = y + a * k
z = y - n
if z < 0:
	print(0)
else:
	print(z)


i = str(input()).split(' ')
k = int(i[0])
n = int(i[1])
w = int(i[2])
r = int(k * (w * (w + 1)) / 2 - n)
if r < 0:
	r = 0
print(r)


(k, n, w) = map(int, input().split())
cost = 0
for e in range(1, w + 1):
	cost = cost + e * k
if cost <= n:
	print('0')
else:
	print(cost - n)


m = list(input().split())
k = int(m[0])
n = int(m[1])
w = int(m[2])
s1 = 0
l = 0
for i in range(1, w + 1):
	s1 = s1 + i * k
l = s1 - n
if l <= 0:
	print(0)
else:
	print(l)


(K, N, W) = input().split()
k = int(K)
n = int(N)
w = int(W)
amount = 0
for i in range(w):
	amount += (i + 1) * k
if amount - n >= 0:
	print(amount - n)
else:
	print(0)


(k, n, w) = map(int, input().split())
coefficient = w * (w + 1) / 2
total = k * coefficient
if total > n:
	print(int(total - n))
else:
	print(0)


(k, n, w) = map(int, input().split())
p = w * (k + w * k) // 2
print(max(0, p - n))


def main():
	total = 0
	(k, n, w) = map(int, input().split())
	for i in range(1, w + 1):
		total += k * i
	if total > n:
		needed = total - n
	else:
		needed = 0
	print(needed)
main()


(k, n, w) = input().split()
(money, j) = [0, 0]
for i in range(0, int(w) + 1):
	money += i * int(k)
	j += 1
if money >= int(n):
	print(money - int(n))
else:
	print(0)


x = input()
y = x.split(' ')
a = []
pd = 0
rew = 0
for i in y:
	a.append(int(i))
rew = a[2]
for i in range(1, rew + 1):
	pd += i * a[0]
if a[1] >= pd:
	print(0)
else:
	print(pd - a[1])


(k, n, w) = map(int, input().split())
j = []
for i in range(1, w + 1):
	x = i * k
	j.append(x)
t = sum(j)
p = t - n
if p > 0:
	print(p)
else:
	print(0)


__author__ = 'Max'
(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
money = k * w * (w + 1) / 2
if money > n:
	c = money - n
	c = int(c)
	print(c)
else:
	print(0)


import sys
text = [int(x) for x in sys.stdin.read().split(' ')]
print(max(text[0] * text[2] * (text[2] + 1) // 2 - text[1], 0))


(first, dollar, want) = map(int, input().split())
cost = 0
for i in range(want):
	cost = cost + (i + 1) * first
r = cost - dollar
if r > 0:
	print(r)
else:
	print(0)


w = input().split()
k = eval(w[0])
n = eval(w[1])
b = eval(w[2])
i = 1
c = 0
while i <= b:
	c += i
	i += 1
if k * c > n:
	print(k * c - n)
else:
	print(0)


banana_list = []
(k, n, w) = map(int, input().split())
for i in range(1, w + 1):
	banana_list.append(i)
price = sum(banana_list) * k
if price - n == 0:
	print(0)
elif price - n < 0:
	print('0')
else:
	print(price - n)


sum = 0
nums = list(map(int, input().split()))
for i in range(nums[2]):
	sum += (i + 1) * nums[0]
sum -= nums[1]
if sum >= 0:
	print(sum)
else:
	print('0')


import os
(k, n, w) = list(map(int, input().rstrip().split()))
c = 0
for i in range(1, w + 1):
	c += k * i
if c <= n:
	print(0)
else:
	print(c - n)


s = input()
(a, b, c) = s.split()
k = int(a)
n = int(b)
w = int(c)
m = w * (w + 1) / 2 * k
if n < m:
	print(int(m - n))
else:
	print(0)


(k, n, w) = map(int, input().split())
an = 0
for i in range(1, w + 1):
	an += i * k
ans = an - n
if ans < 0:
	print(0)
else:
	print(ans)


from functools import reduce
string = input()
arr = string.split(' ')
k = int(arr[0])
n = int(arr[1])
w = int(arr[2])
a = list(range(w + 1))
p = reduce(lambda x, y: x + y * k, a)
if p - n < 0:
	print(0)
else:
	print(p - n)


(k, n, w) = map(eval, input().split())
s = 0
for i in range(1, w + 1):
	s = s + i
if s * k <= n:
	print('0')
else:
	print(s * k - n)


def bananaas():
	n = list(map(int, input().split()))
	a = n[0] * (n[2] * (n[2] + 1) / 2)
	if a - n[1] < 1:
		return 0
	else:
		return int(a - n[1])
print(bananaas())


lista = list(map(int, input().split()))
k = lista[0]
n = lista[1]
w = lista[2]
S = 0
for i in range(w + 1):
	S = S + i
if k * S - n > 0:
	print(k * S - n)
else:
	print(0)


a = input().split()
total = int(a[0]) * (int(a[2]) ** 2 + int(a[2])) // 2
if total > int(a[1]):
	print(int(abs(int(a[1]) - total)))
else:
	print('0')


number = list(map(int, input().split()))
money = 0
for i in range(number[2]):
	money += (i + 1) * number[0]
print(max(money - number[1], 0))


import math
import re
s = list(map(int, input().split(' ')))
a = s[0]
b = s[1]
c = s[2]
sum = a * (c * (c + 1) / 2) - b
print(int([0, sum][sum > 0]))


(diyigeduoshaoqian, youduoshaoqian, maiduoshaoge) = [int(i) for i in input().split()]
gongduoshaoqian = 0
for i in range(1, maiduoshaoge + 1):
	gongduoshaoqian = gongduoshaoqian + i * diyigeduoshaoqian
if gongduoshaoqian > youduoshaoqian:
	print(gongduoshaoqian - youduoshaoqian)
else:
	print('0')


def tot(a, n):
	res = 0
	for i in range(1, n + 1):
		res += a * i
	return res
(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
s = tot(k, w)
if s > n:
	print(s - n)
else:
	print(0)


info = input()
info_list = info.split()
total = 0
for time in range(1, int(info_list[2]) + 1):
	total += time * int(info_list[0])
if total > int(info_list[1]):
	print(total - int(info_list[1]))
else:
	print(0)


(k0, n0, w0) = input().split()
k = int(k0)
w = int(w0)
n = int(n0)
cijena = 0
for i in range(w):
	cijena = cijena + (i + 1) * k
if cijena > n:
	print(cijena - n)
else:
	print(0)


import sys
nums = sys.stdin.readline()
while nums:
	(k, w, n) = nums.split()
	k = int(k)
	w = int(w)
	n = int(n)
	total = 0
	for i in range(n):
		total += k * (i + 1)
	if total > w:
		print(total - w)
	else:
		print(0)
	nums = sys.stdin.readline()


(c, m, a) = map(int, input().split())
t = 0
for i in range(1, a + 1):
	t += c * i
print([0, t - m][t > m])


s = input()
j = s.split()
for i in range(len(j)):
	if i == 0:
		k = int(j[0])
	elif i == 1:
		n = int(j[1])
	else:
		w = int(j[2])
if 1 <= k and w <= 1000 and (0 <= n <= 10 ** 9):
	s = 0
	for i in range(1, w + 1, 1):
		j = i * k
		s = s + j
	s = s - n
	if s <= 0:
		print(0)
	else:
		print(s)


n = list(map(int, input().split()))
a = n[0]
b = n[1]
c = n[2]
t = c * (c + 1) // 2
t = t * a
if t - b >= 0:
	print(t - b)
else:
	print(0)


stroka = input()
a = stroka.split()
cost = int(a[0])
money = int(a[1])
count = int(a[2])
real_cost = (1 + count) / 2 * count * cost
if int(real_cost - money) <= 0:
	print('0')
else:
	print(int(real_cost - money))


(k, n, w) = [int(i) for i in input().split()]

def price_of_bananas():
	total_price = k * (w * (w + 1) // 2)
	money_due = n - total_price
	if money_due < 0:
		print(money_due * -1)
	else:
		print('0')
price_of_bananas()


k = 0
n = 0
w = 0
d = input().split(' ')
k = int(d[0])
n = int(d[1])
w = int(d[2])
price = int(w * (w + 1) / 2 * k)
if price < n:
	print(0)
else:
	print(price - n)


def solve(k, n, w):
	cost = 0
	for i in range(1, w + 1):
		cost += i * k
	return max(cost - n, 0)
(k, n, w) = input().split(' ')
k = int(k)
n = int(n)
w = int(w)
print(solve(k, n, w))


(k, n, w) = map(int, input().split())
l = []
for i in range(1, w + 1):
	l.append(k * i)
borrowed = sum(l) - n
if borrowed < 0:
	borrowed = 0
print(borrowed)


(c, m, n) = list(map(int, input().split()))
res = n * (2 * c + (n - 1) * c) // 2 - m
print(res if res > 0 else 0)


(k, n, w) = map(int, input().split())
c = (k + w * k) * w // 2
j = n - c
print(max(-j, 0))


(n, x, y) = input().split(' ')
sum = 0
for i in range(1, int(y) + 1):
	sum = sum + i * int(n)
if sum > int(x):
	print(sum - int(x))
else:
	print('0')


(cost, amount, banana) = map(int, input().split())
cst = 0
for i in range(1, banana + 1):
	cst += i * cost
if cst - amount > 0:
	print(cst - amount)
else:
	print(0)


(x, y, z) = input().split(' ')
k = int(x)
d = int(y)
w = int(z)
m = w * (w + 1) // 2 * k - d
if m > 0:
	print(m)
else:
	print('0')


n = input().split()
x = int(n[0])
y = int(n[1])
z = int(n[2])
c = 0
i = 1
while i <= z:
	c += i * x
	i += 1
if y > c:
	print('0')
else:
	print(c - y)


x = input().strip('\n').split(' ')
y = int(x[1])
for i in range(1, int(x[2]) + 1):
	y = y - i * int(x[0])
if y >= 0:
	print(0)
else:
	print(abs(y))


(k, n, w) = [int(x) for x in input().split()]
m = k * w * (w + 1) / 2
a = int(m - n)
if a > 0:
	print(a)
else:
	print('0')


(p, d, b) = [int(i) for i in input().split(' ')]
t = p * (b * (b + 1) / 2)
brw = t - d
if brw <= 0:
	print(0)
else:
	print(int(brw))


(k, n, w) = map(int, input().split(' '))
suma = 0
for i in range(1, w + 1):
	suma = suma + i * k
if suma == n or n > suma:
	print('0')
else:
	print(suma - n)


(k, n, w) = [int(i) for i in input().split()]
prices = []
for x in range(1, w + 1):
	prices.append(k * x)
if sum(prices) - n > 0:
	print(sum(prices) - n)
else:
	print(0)


__author__ = 'Adam'
import sys
(k, n, w) = sys.stdin.readline().split(' ')
(k, n, w) = (int(k), int(n), int(w))
delta = n - sum([k * i for i in range(1, w + 1)])
if delta >= 0:
	print(0)
else:
	print(abs(delta))


(k, n, w) = [int(y) for y in input().split()]
total_cost = 0
for i in range(1, w + 1):
	total_cost += i * k
to_borrow = total_cost - n
if to_borrow < 0:
	print(0)
else:
	print(to_borrow)


(k, h, n) = list(input().split(' '))
k = int(k)
h = int(h)
n = int(n)
total = 0
for i in range(n):
	total += k * (i + 1)
result = total - h
if result >= 0:
	print(total - h)
else:
	print(0)


(prize, allowance, no) = map(int, input().split())
cost = 0
for i in range(1, no + 1):
	cost = cost + i * prize
if cost > allowance:
	print(str(abs(allowance - cost)))
else:
	print(0)


i = input().split()
(k, n, w) = (int(i[0]), int(i[1]), int(i[2]))
tot = k * w * (w + 1) // 2
if tot > n:
	print(tot - n)
else:
	print('0')


a = input()
x = a.split()
k = int(x[0])
n = int(x[1])
w = int(x[2])
temp = int(w * (w + 1) / 2) * k
temp = int(temp)
result = temp - n
if result >= 0:
	print(result)
else:
	print(0)


import sys
(k, n, w) = [int(x) for x in input().split()]
s = 0
for i in range(1, w + 1):
	s += i * k
if n > s:
	print('0')
else:
	print(s - n)


(k, n, w) = map(int, input().split())
print((abs(n - (w + 1) * w * k // 2), 0)[n - (w + 1) * w * k // 2 >= 0])


(m, h, w) = map(int, input().split())
total = 0
for _ in range(1, w + 1):
	total += m * _
money = total - h
if money < 0:
	print(0)
else:
	print(total - h)


(k, n, w) = map(int, input().split())
cost = w * (w + 1) // 2 * k
if n - cost < 0:
	print(str(cost - n))
else:
	print('0')


a = str(input())
a = a.split(' ')
k = int(a[0])
n = int(a[1])
w = int(a[2])
x = int(0)
i = 1
while i in range(w + 1):
	x += k * i
	i = i + 1
x = x - n
if x <= 0:
	print(0)
if x > 0:
	print(x)


line = input().split(' ')
first_banana = int(line[0])
money = int(line[1])
bananas = int(line[2])
total_money_req = first_banana * bananas * (bananas + 1) / 2
money_borrowed = total_money_req - money
if money_borrowed > 0:
	print(int(round(money_borrowed)))
else:
	print('0')


(x, y, z) = map(int, input().split(' '))
sum = 0
for i in range(1, z + 1):
	b = i * x
	sum = sum + b
if sum < y:
	print(0)
	exit()
print(sum - y)


def main():
	(k, n, w) = [int(x) for x in input().split()]
	count = 0
	for x in range(1, w + 1):
		count += k * x
	if count > n:
		print(count - n)
	else:
		print(0)
main()


tot = list(map(int, input().split()))
k = tot[0]
n = tot[1]
w = tot[2]
cost = 0
for i in range(1, w + 1):
	cost = cost + i * k
if n >= cost:
	print(0)
else:
	print(cost - n)


(k, n, w) = map(int, input().split())
sm = 0
for i in range(w):
	sm += (i + 1) * k
t = sm - n
if t <= 0:
	print(0)
else:
	print(t)


import math
(k, n, w) = [int(x) for x in input().split()]
a_1 = k
a_n = w * k
S = math.floor((a_1 + a_n) / 2 * w)
print(S - n if S >= n else 0)


s = input()
g = 0
m = []
for x in s.split():
	m.append(x)
k = int(m[0])
n = int(m[1])
w = int(m[2])
for i in range(1, w + 1):
	g += k * i
if g > n:
	print(abs(n - g))
if g == n or g < n:
	print(0)


(k, m, n) = map(int, input().split())
r = 0
for q in range(n):
	r = r + (q + 1) * k
if r - m <= 0:
	print('0')
else:
	print(r - m)


(a, cost_he_has, n) = map(int, input().split())
print(max(0, int(n / 2 * (a + a * n) - cost_he_has)))


(k, n, w) = map(int, input().split())
s = 0
for f in range(w):
	s += k * (f + 1)
if s - n <= 0:
	print(0)
else:
	print(s - n)


(k, n, w) = map(int, input().split())
J = 0
for i in range(1, w + 1):
	J = J + i * k
	x = J - n
	if x < 0:
		x = 0
print(x)


def soma(n):
	return n * (n + 1) / 2

def read_array():
	x = []
	x1 = []
	x = input()
	x = x.split(' ')
	for r in range(len(x)):
		x1.append(int(x[r]))
	return x1
x = read_array()
result = soma(x[2]) * x[0]
if result >= x[1]:
	print(int(result - x[1]))
else:
	print(0)


(k, n, w) = list(map(int, input().split()))
amount = k * (w * (w + 1) // 2)
diff = amount - n
if diff < 0:
	print(0)
else:
	print(diff)


amount = 0
(k, n, w) = list((int(x) for x in input().split()))
for i in range(w + 1):
	amount += i * k
if amount <= n:
	print(0)
else:
	print(amount - n)


(k, init, i) = map(int, input().split())
finalamt = 0
for j in range(1, i + 1):
	finalamt += k * j
if finalamt > init:
	print(finalamt - init)
else:
	print('0')


li = list(map(int, input().strip().split()))
k = li[0]
n = li[1]
w = li[2]
ans = 0
va = 0
for i in range(1, w + 1):
	ans = ans + k * i
if n >= ans:
	print('0')
else:
	ans = ans - n
	print(ans)


(n, m, a) = map(int, input().split())
s = 0
for i in range(1, a + 1):
	s = s + n * i
if s > m:
	print(s - m)
else:
	print(0)


(c, d, b) = map(int, input().split())
print(max(0, b * (b + 1) * c // 2 - d))


user_input = list(map(int, input().split()))
(u_price, dollars, bananas) = user_input
cart = 0
for i in range(1, bananas + 1):
	cart += u_price * i
if cart <= dollars:
	print(0)
else:
	cart -= dollars
	print(cart)


from sys import stdin
arr = str(stdin.readline()).strip().replace('\n', '')
arr = arr.split(' ')
k = int(arr[0])
w = int(arr[1])
n = int(arr[2])
result = (2 * k + k * (n - 1)) / 2 * n
if result > w:
	print(int(result - w))
else:
	print(0)


(k, n, w) = map(int, input().split(' '))
cost = k * w * (w + 1) / 2
print(int((cost - n) * (cost > n)))


(k, n, w) = map(int, input().split())
counter = 1
bananas = k
while counter < w:
	counter += 1
	bananas += counter * k
if bananas > n:
	print(bananas - n)
else:
	print(0)


intake = list(map(int, input().split(' ')))
sum = 0
for i in range(intake[2]):
	money = intake[0] * (i + 1)
	sum += money
if sum > intake[1]:
	print(sum - intake[1])
else:
	print('0')


import sys
inf = float('inf')
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
(mod, MOD) = (1000000007, 998244353)
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
(k, n, w) = get_ints()
total = k * (w + 1) * w // 2
print(max(total - n, 0))


input_list = input().split()
k = eval(input_list[0])
n = eval(input_list[1])
w = eval(input_list[2])
needed = k * (1 + w) * w // 2
print(max([needed - n, 0]))


str1 = input()
l1 = str1.split(' ')
l1 = [int(i) for i in l1]
total_cost = 0
dum = 0
for i in range(l1[2] + 1):
	total_cost += i * l1[0]
borrow = total_cost - l1[1]
if borrow <= 0:
	print(dum)
else:
	print(borrow)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
su = 0
for i in range(1, w + 1):
	su += i * k
br = su - n
if br > 0:
	print(br)
else:
	print('0')


knw = input().split()
k = int(knw[0])
n = int(knw[1])
w = int(knw[2])
topay = k * w * (w + 1) // 2
borrow = topay - n
if borrow > 0:
	print(borrow)
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
cost = 0
time = 1
for i in range(w):
	cost += k * time
	time += 1
x = cost - n
if x >= 0:
	print(x)
if x < 0:
	print(0)


s = input().split()
k = s[0]
n = s[1]
w = s[2]
sum = 0
for i in range(1, int(w) + 1):
	sum = sum + i * int(k)
l = sum - int(n)
if l == 0:
	print('0')
elif l < 0:
	print('0')
else:
	print(l)


arr = list(map(int, input().strip().split()))
cost = [x * arr[0] for x in range(1, arr[2] + 1)]
result = sum(cost) - arr[1]
if result < 0:
	print(0)
else:
	print(result)


inp = input()
inputlist = inp.split()
j = 1
costs = 0
for i in range(0, int(inputlist[2])):
	costs = costs + int(inputlist[0]) * j
	j += 1
result = costs - int(inputlist[1])
if result < 0:
	print('0')
else:
	print(result)


input = input()
input = input.rsplit(' ')
k = int(input[0])
dollars = int(input[1])
bananas = int(input[2])
cost = 0
for i in range(1, bananas + 1):
	cost = cost + i * k
borrow = cost - dollars
if borrow < 0:
	print(0)
else:
	print(borrow)


f = [int(x) for x in input().split()]
k = f[0]
n = f[1]
w = f[2]
cost = 0
for i in range(1, w + 1):
	cost += k * i
if n - cost < 0:
	print(abs(n - cost))
else:
	print(0)


def SolandBan(k, n, w):
	cost = 0
	for i in range(1, w + 1):
		cost += i * k
	if cost - n > 0:
		return cost - n
	return 0
inp = list(map(int, input().rstrip().split()))
k = inp[0]
n = inp[1]
w = inp[2]
print(SolandBan(k, n, w))


(k, n, w) = list(map(int, input().split()))
print(max(int(w * (k + k * w) / 2 - n), 0))


hello = list(map(int, input().split()))
k = hello[0]
n = hello[1]
w = hello[2]
money = 0
for i in range(1, w + 1):
	money += i * k
print(abs(money - n)) if money > n else print(0)


var = input()
numeros = var.split(' ')
valor = 0
for i in range(0, int(numeros[2])):
	valor = valor + (i + 1) * int(numeros[0])
total = valor - int(numeros[1])
if total > 0:
	print(total)
else:
	print('0')


(k, n, w) = list(map(int, input().strip().split(' ')))
res = [i * k for i in range(1, w + 1)]
sum1 = sum(res)
if sum1 > n:
	print(abs(sum1 - n))
else:
	print(0)


import sys
(K, N, W) = map(int, sys.stdin.readline().split())
tcost = (K + K * W) * W // 2
if tcost < N:
	print(0)
else:
	print(tcost - N)


def foo(k, n, w):
	sum = 0
	for each in range(1, w + 1):
		sum += k * each
	sum -= n
	return sum if sum > 0 else 0
(a, b, c) = [int(a) for a in input().split()]
print(foo(a, b, c))


a = input().split(' ')
banana = int(a[0])
dollars = int(a[1])
want = int(a[2])
total = 0
i = 0
j = 1
while i < want:
	total += j * banana
	j += 1
	i += 1
if dollars > total:
	print('0')
else:
	print(total - dollars)


import sys
import re
for line in sys.stdin:
	m = re.match('^(\\d+) (\\d+) (\\d+)$', line)
	if m is None:
		break
	(k, n, w) = (int(m.group(1)), int(m.group(2)), int(m.group(3)))
s = k * w * (w + 1) / 2
if s <= n:
	print(0)
else:
	print(int(s - n))


inputan = list(map(int, input().split()))
total = [inputan[0] * (i + 1) for i in range(inputan[2])]
if sum(total) - inputan[1] < 0:
	total = 0
else:
	total = sum(total) - inputan[1]
print(total)


knw = input().split()
k = int(knw[0])
n = int(knw[1])
w = int(knw[2])
ans = 0
for x in range(1, w + 1):
	ans += x * k
print(max(ans - n, 0))


(i, n, w) = map(int, input().split(' '))
sum = w * (i + i * w) / 2
if sum - n < 0:
	print(0)
else:
	print(int(sum - n))


a = list(map(int, input().rstrip().split()))
first = a[0]
dollar = a[1]
quantity = a[2]
s = 0
for i in range(1, quantity + 1):
	s = s + first * i
if s - dollar > 0:
	print(s - dollar)
else:
	print(0)


request = input()
list_request = request.split(' ')

def check_need(need_money, my_money):
	if int(my_money) >= need_money:
		return 0
	else:
		return need_money - int(my_money)

def how_much_to_pay(first_price, q):
	i = 1
	price = 0
	while i <= int(q):
		price = price + int(first_price) * i
		i += 1
	return price
print(check_need(how_much_to_pay(list_request[0], list_request[2]), list_request[1]))


(b, m, n) = map(int, input().split(' '))
total = 0
for i in range(1, n + 1):
	total += b * i
if m > total:
	print(0)
else:
	print(total - m)


knp = list(map(str, input().split()))
k = int(knp[0])
n = int(knp[1])
p = int(knp[2])
sum = 0
for i in range(1, p + 1):
	sum += k * i
if sum > n:
	print(sum - n)
else:
	print('0')


l = list(map(int, input().split()))
k = l[0]
n = l[1]
w = l[2]
su = 0
w = w + 1
for i in range(1, w):
	su += k * i
if su > n:
	print(su - n)
else:
	print(0)


from sys import stdin
input = stdin.readline
(k, n, w) = map(int, input().split())
result = 0
for i in range(1, w + 1):
	result += k * i
if n >= result:
	print(0)
else:
	print(result - n)


a = input().split()
a = list(map(int, a))
k = a[0]
n = a[1]
w = a[2]
summ = 0
i = 1
for banana in range(w):
	summ += k * i
	i += 1
if n < summ:
	answer = abs(n - summ)
else:
	answer = 0
print(answer)


a = list(map(int, input().rstrip().split()))
f = a[0]
d = a[1]
q = a[2]
s = 0
for i in range(1, q + 1):
	s = s + f * i
if s - d > 0:
	print(s - d)
else:
	print(0)


a = input().split(' ')
pos = 1
m = 0
for i in range(int(a[-1])):
	m = m + pos * int(a[0])
	pos += 1
if m > int(a[1]):
	print(abs(m - int(a[1])))
else:
	print('0')


(k, n, w) = [int(i) for i in input().split()]
hasil = 0
for i in range(1, w + 1):
	hsl = k * i
	hasil += hsl
if hasil > n:
	print(hasil - n)
else:
	print(0)


input_string = list(map(lambda x: int(x), input().split()))
k = input_string[0]
n = input_string[1]
w = input_string[2]
ans = k * w * (w + 1) / 2 - n
if ans <= 0:
	print(0)
else:
	print(str(int(ans)))


(k, n, w) = map(int, input().split())
temp = 0
for x in range(1, w + 1):
	temp += k * x
ans = temp - n
if ans <= 0:
	print(0)
elif ans > 0:
	print(ans)


k = list(map(int, input().split()))
print(max(0, int(k[0] * (k[2] * (k[2] + 1) / 2) - k[1])))


data = input()
dl = list(str(data).split())
k = int(dl[0])
n = int(dl[1])
w = int(dl[2])
total_cost = k * w * (w + 1) / 2
need = -(n - total_cost)
if need < 0:
	print(0)
else:
	print(int(need))


(k, n, w) = (int(i) for i in input().strip().split(' '))
money = k * ((1 + w) / 2 * w)
print(int(money - n) if n < money else 0)


def solve(k, n, w):
	return max(0, k * w * (1 + w) // 2 - n)

def main():
	[k, n, w] = [int(i) for i in input().strip().split()]
	result = solve(k, n, w)
	print(result)
main()


from math import *
from collections import deque
from copy import deepcopy
import sys

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def multi():
	return map(int, input().split())

def lis():
	return list(map(int, inp().split()))

def out(var):
	sys.stdout.write(str(var))

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True
(k, n, w) = multi()
if (w + 1) * k * (w / 2) - n <= 0:
	print(0)
else:
	print(ceil((w + 1) * k * (w / 2) - n))


(k, n, w) = map(int, input().split())
bananas = k * w * (w + 1) // 2
print([0, bananas - n][bananas - n > 0])


s = input()
s = str.split(s)
k = int(s[0])
n = int(s[1])
w = int(s[2])
cost = 0
for i in range(w):
	cost = cost + (i + 1) * k
loan = cost - n
if loan < 0:
	loan = 0
print(loan)


def init():
	nums = input()
	list_nums = nums.split()
	k = int(list_nums[0])
	n = int(list_nums[1])
	w = int(list_nums[2])
	amount = 0
	borrow = 0
	for i in range(0, w):
		amount = amount + k * (i + 1)
	if n < amount:
		borrow = amount - n
	print(borrow)
init()


a = list(input().split(' '))
w = int(a[2])
k = int(a[0])
n = int(a[1])
c = w * (w + 1) / 2 * k
b = c - n
if b > 0:
	print(int(b))
else:
	print('0')


def ras(k, n, w):
	x = 0
	for i in range(1, w + 1):
		x = x + i * k
	y = x - n
	if y < 0:
		return 0
	return y
(k, n, w) = map(int, input().split())
r = ras(k, n, w)
print(r)


a = list(map(int, input().strip().split()))
l = 0
for i in range(1, a[2] + 1):
	l = l + i * a[0]
if l <= a[1]:
	print('0')
else:
	print(l - a[1])


input = input()
input = input.split()
k = int(input[0])
n = int(input[1])
w = int(input[2])
i = 0
d = 0
while d != w:
	d += 1
	i = k * d + i
i -= n
if i <= 0:
	print('0')
else:
	print(i)


line = list(map(int, input().split()))
k = line[0]
n = line[1]
w = line[2]
borrow = int(k * (w + 1) * w / 2 - n)
if borrow <= 0:
	borrow = 0
print(borrow)


def main():
	(k, n, w) = list(map(int, input().split()))
	while w > 0:
		n -= w * k
		w -= 1
	if n < 0:
		print('{}'.format(n * -1))
	else:
		print('{}'.format(0))
main()


(k, n, w) = [int(x) for x in input().split()]
a = k * w * (w + 1) * 0.5
if n < a:
	print(int(a - n))
else:
	print(0)


from sys import stdin
(k, n, w) = [int(y) for y in stdin.readline().split()]
summa = 0
for x in range(1, w + 1):
	summa += x * k
if summa - n < 0:
	print(0)
else:
	print(summa - n)


a = input()
k = 0
i = 1
c = 0
l = 0
b = a.split(' ')
b[0] = int(b[0])
b[1] = int(b[1])
b[2] = int(b[2])
while k < b[2]:
	b[0] = b[0] * i
	c = c + b[0]
	k = k + 1
	l = l + c
if l - b[1] < 0:
	print(0)
else:
	print(l - b[1])


numbers = input().split(' ')
prix_banana = int(numbers[0])
money = int(numbers[1])
bananas_to_buy = int(numbers[2])
prix_total = prix_banana * ((1 + bananas_to_buy) * bananas_to_buy / 2)
missed = int(money - prix_total)
if missed < 0:
	print(missed * -1)
else:
	print(0)


a = list(map(int, input().split()))
price = a[0]
money = a[1]
item = a[2]
arr = []
total = 0
check = 0
for i in range(1, item + 1):
	check = price * i
	total += check
if money > total:
	print('0')
else:
	print(abs(total - money))


def rec(k, w):
	s = 0
	for i in range(w + 1):
		s = s + k * i
	return s
(k, n, w) = map(int, input().split(' '))
l = rec(k, w)
print(int(0) if l <= n else int(l - n))


n = input().split()
cost = int(n[0])
money = int(n[1])
bananas = int(n[2])
summa = 0
for i in range(1, bananas + 1):
	summa = summa + cost * i
result = summa - money
if result <= 0:
	print('0')
else:
	print(result)


(k, n, w) = map(int, input().split())
b = 1
s = 0
f = 0
for i in range(w):
	s = s + b * k
	b += 1
if s > n:
	f = s - n
print(f)


(k, n, w) = input().split(sep=' ')
i = 1
total = 0
w = int(w)
k = int(k)
n = int(n)
while i <= w:
	total = total + i * k
	i = i + 1
if total - n >= 0:
	print(total - n)
else:
	print(0)


(k, n, w) = map(int, input().split())
r = w * (w + 1) / 2
s = k * r
t = n - s
if t > 0:
	print('0')
else:
	print(-int(t))


def borrow_money(k, n, w):
	total = w * (w + 1) * k / 2
	if total >= n:
		print(int(total - n))
	else:
		print(0)
a = list(map(int, input('').split()))
borrow_money(a[0], a[1], a[2])


s = input().split(' ')
k = int(s[0])
n = int(s[1])
w = int(s[2])
number = 1
cost = 0
while w != 0:
	cost += number * k
	number += 1
	w -= 1
if n >= cost:
	print(0)
else:
	print(cost - n)


(a, h, n) = map(int, input().split(' '))
p = n / 2
l = (n + 1) * a
s = p * l
if s > h:
	w = s - h
	print(int(w))
else:
	print(0)


knw = list(map(int, input().strip().split()))
k = knw[0]
n = knw[1]
w = knw[2]
s = int(w * (2 * k + (w - 1) * k) / 2)
if s <= n:
	print('0')
else:
	print(s - n)


import sys
import os

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def take_input():
	if os.environ.get('check'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
take_input()
(c, k, b) = int_array()
paisa = 0
count = 1
for i in range(b):
	paisa += count * c
	count += 1
if k - paisa < 0:
	print(abs(k - paisa))
else:
	print(0)


import sys
import math

def main():
	(k, n, w) = list(map(int, sys.stdin.readline().strip().split(' ')))
	res = int(k * (1 + w) * w / 2 - n)
	if res < 0:
		sys.stdout.write(str(0))
	else:
		sys.stdout.write(str(res))
main()


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
o = t = 0
for i in range(1, w + 1):
	t = t + k * i
o = t - n
if o < 0:
	o = 0
print(o)


line = input()
(k, n, w) = [int(a) for a in line.split()]
x = k * w * (w + 1) // 2 - n
if x < 0:
	x = 0
print(x)


p = 0
(k, n, w) = map(int, input().split(' '))
x = w * (w + 1) * 0.5 * k - n
if x <= 0:
	print(p)
if x > 0:
	print(int(x))


s = tuple(map(int, input().split(' ')))
money = s[0] * s[2] * (s[2] + 1) // 2
print(money - s[1]) if money > s[1] else print(0)


(k, n, i) = list(map(int, input().strip().split()))
res = 0
for x in range(1, i + 1):
	res += k * x
if res - n > 0:
	print(res - n)
else:
	print(0)


def main():
	(k, n, w) = [int(i) for i in input().split()]
	c = k * w * (w + 1) // 2
	if c <= n:
		print(0)
	else:
		print(c - n)
main()


n = list(map(int, input().split(' ')))
sum = 0
for x in range(1, n[2] + 1):
	sum = n[0] * x + sum
k = 0
if sum > n[1]:
	k = sum - int(n[1])
else:
	k = 0
print(k)


txt = input()
txt = txt.split(' ')
price = int(txt[0])
dollars = int(txt[1])
bananas = int(txt[2])
total = 0
for i in range(1, bananas + 1):
	total += price * i
dollars -= total
dollars *= -1
if dollars < 0:
	dollars = 0
print(dollars)


(k, n, w) = [int(x) for x in input().split()]
r = (w * (w + 1) >> 1) * k
print(max(r - n, 0))


(a, b, n) = [int(x) for x in input().split(' ')]
sum = int(n / 2 * (2 * a + (n - 1) * a))
if b >= sum:
	print('0')
else:
	print(sum - b)


li = [int(i) for i in input().split()]
a = li[0]
d = li[1]
n = li[2]
s = a
for i in range(n - 1):
	s = s + a * (i + 2)
if s > d:
	print(s - d)
else:
	print('0')


(k, n, w) = map(int, input().split())
ans = 0
for t in range(1, w + 1):
	ans += t * k
print(max(0, ans - n))


list = input().split(' ')
k = int(list[0])
n = int(list[1])
w = int(list[2])
count = 0
total_sum = 0
for i in range(1, w + 1):
	total_sum = total_sum + i * k
borrow = total_sum - n
if borrow > 0:
	print(borrow)
else:
	print(0)


def solve(k, n, w):
	res = max(0, w * (w + 1) // 2 * k - n)
	print(res)
(k, n, w) = map(int, input().split())
solve(k, n, w)


(cena, nauda, skaits) = [int(i) for i in input().split()]
sum = 0
for i in range(1, skaits + 1, 1):
	sum = sum + cena * i
nauda = sum - nauda
if nauda < 0:
	print(0)
else:
	print(nauda)


(first, sol, col) = list(map(int, input().split()))
tmp = first
sm = 0
for i in range(col):
	sm += tmp
	tmp += first
if sm < sol:
	print(0)
else:
	print(sm - sol)


t = list(map(int, input().split()))
a = t[0]
d = t[0]
n = t[2]
mon = t[1]
s = n / 2 * (2 * a + (n - 1) * d)
s = int(s - mon)
if s < 0:
	print(0)
else:
	print(s)


def cost(bananas, k):
	cost = 0
	for i in range(bananas):
		cost = cost + k * (i + 1)
	return cost
numbers = input().split()
if cost(int(numbers[2]), int(numbers[0])) <= int(numbers[1]):
	print(0)
else:
	print(cost(int(numbers[2]), int(numbers[0])) - int(numbers[1]))


(k, n, w) = map(int, input().split())
cost = 0
for i in range(1, w + 1):
	cost = cost + i * k
bor = cost - n
if bor < 0:
	bor = 0
print(bor)


(first_banana, money, banana_count) = map(int, input().split())
res = 0
for i in range(1, banana_count + 1):
	res = res + first_banana * i
ans = res - money
print(ans if ans > 0 else 0)


(k, n, w) = map(int, input().split())
i = 1
kil = 0
v = 0
while kil < w:
	kil = kil + 1
	v = v + i * k
	i = i + 1
if v > n:
	print(v - n)
else:
	print(0)


(a, b, c) = map(int, input().split())
l = []
for x in range(c + 1):
	y = a * x
	l.append(y)
h = sum(l)
g = b - h
if g >= 0:
	print('0')
else:
	print(abs(g))


(x, y, z) = map(int, input().split())
total = 0
for i in range(z):
	total += x * (i + 1)
k = total - y
if y >= total:
	print('0')
else:
	print(abs(k))


s = [int(n) for n in input().split()]
a = s[0] * (s[2] * (s[2] + 1)) / 2
if a <= s[1]:
	print(0)
else:
	print(int(a - s[1]))


(k, n, w) = list(map(int, input().rstrip().split()))
amount = k * (w * (w + 1)) / 2
borrow = int(amount - n)
if borrow < 0:
	print(0)
else:
	print(borrow)


def main():
	lista = input('').split()
	k = int(lista[0])
	n = int(lista[1])
	w = int(lista[2])
	s = 0
	summ = 0
	answ = 0
	for i in range(1, w + 1):
		s = k * i
		summ += s
	answ = summ - n
	print(answ if answ > 0 else '0')
main()


m = list(map(int, input().split()))
a = m[0]
b = m[1]
c = m[2]
d = int(a * c * (1 + c) / 2)
if b >= d:
	print(0)
else:
	print(d - b)


i = list(map(int, input().split()))
f = int(i[0])
g = int(i[1])
h = int(i[2])
s = h * (f + (f + f * (h - 1))) / 2
if g > s:
	print('0')
else:
	print(int(s - g))


n = input().split()
total = 0
for i in range(1, int(n[2]) + 1):
	total += int(i) * int(n[0])
if total > int(n[1]):
	print(total - int(n[1]))
else:
	print(0)


l = [int(i) for i in input().split()]
print(max(l[2] * (2 * l[0] + (l[2] - 1) * l[0]) // 2 - l[1], 0))


def Main():
	(k, n, w) = map(int, input().split(' '))
	tot = 0
	for i in range(1, w + 1):
		tot += k * i
	if n >= tot:
		print(0)
	else:
		print(tot - n)
Main()


k = list(map(int, input().split()))
h = 0
for i in range(1, k[2] + 1):
	h = h + i * k[0]
if h - k[1] > 0:
	print(h - k[1])
else:
	print(0)


import re
(a, b, c) = map(int, input().split())
a *= (c + 1) * c // 2
if a >= b:
	print(a - b)
else:
	print(0)


(k, n, w) = map(int, input().split())
s = w * (w + 1) // 2 * k
print([0, s - n][n < s])


def bananas(precio, dollar, bana):
	dollars = 0
	for i in range(1, bana + 1):
		dollars += precio * i
	dollars = dollars - dollar
	if dollars <= 0:
		return 0
	return dollars
(precio, dollar, bana) = map(int, input().split())
if bana == 0:
	print(bana)
else:
	print(bananas(precio, dollar, bana))


(price, balance, num) = [int(i) for i in input().split(' ')]
print(price * (num + 1) * num // 2 - balance if price * (num + 1) * num // 2 - balance >= 0 else 0)


def borrow(price, bananas, money):
	total = bananas * (bananas + 1) / 2 * price
	total -= money
	return int(total) if total > 0 else 0

def main():
	(price, money, bananas) = map(int, input().split())
	print(borrow(price, bananas, money))
main()


import math
import os
import random
import re
import sys
a = list(map(int, input().rstrip().split()))
(k, n, w) = (a[0], a[1], a[2])
t = k * w * (w + 1) // 2
if t <= n:
	print(0)
else:
	print(t - n)


x = input().split(' ')
k = int(x[0])
n = int(x[1])
w = int(x[2])
i = 1
cost = 0
while i <= w:
	cost += k * i
	i += 1
if cost - n > 0:
	print(cost - n)
else:
	print('0')


(amount_banana, amount, no_of_bananas) = input().split()
x = 0
z = 1
while z < int(no_of_bananas) + 1:
	if int(no_of_bananas) >= 1:
		j = int(amount_banana) * z
		x += j
		z += 1
needed_amount = x - int(amount)
if needed_amount > 0:
	print(needed_amount)
else:
	print(0)


(first_banana, money, count_of_banana) = map(int, input().split())
result = sum([first_banana * (i + 1) for i in range(count_of_banana)]) - money
print(0) if result < 0 else print(result)


(moneyForFirst, money, count) = map(int, input().split())
print(max(sum(range(1, count + 1)) * moneyForFirst - money, 0))


(k, n, w) = input().split()
c = 0
for x in range(int(w)):
	c = c + (x + 1) * int(k)
if int(k) == int(w) and int(n) >= c:
	print(0)
else:
	print(c - int(n))


inputUser = input()
(k, n, w) = [int(i) for i in inputUser.split()]
valueToPay = 0
for x in range(0, w):
	valueToPay += (x + 1) * k
borrowMoney = valueToPay - n
if borrowMoney < 0:
	borrowMoney = 0
print(borrowMoney)


(k, n, w) = map(int, input().split())
curr = k
count = 0
cost = 0
while count < w:
	cost += curr
	count += 1
	curr = (count + 1) * k
if cost <= n:
	print(0)
else:
	print(abs(n - cost))


def mod():
	x = input().split()
	c = list(map(int, x))
	b = c[0]
	i = 1
	g = []
	while i <= c[2]:
		h = b * i
		g.append(h)
		i = i + 1
	v = sum(g) - c[1]
	if v > 0:
		print(v)
	else:
		print(0)
mod()


(k, n, w) = [int(item) for item in input().split(' ')]
result = k * (w * (w + 1)) / 2 - n
if result <= 0:
	print('0')
else:
	print(int(result))


(f, i, n) = map(int, input().split())
sum = 0
for j in range(1, n + 1):
	sum = sum + f * j
m = int(sum - i)
if m > 0:
	print(m)
else:
	print(0)


(pr, mon, need) = map(int, input().split())
sum = 0
for i in range(1, need + 1):
	sum = sum + pr * i
if sum > mon:
	print(sum - mon)
elif sum <= mon:
	print('0')


a = list(map(int, input().split()))
k = a[0]
n = a[1]
w = a[2]
s = w * k * (w + 1) // 2
p = s - n
if p <= 0:
	print('0')
else:
	print(p)


s = input().split(' ')
(a, b, c) = (int(s[0]), int(s[1]), int(s[2]))
val = int(a * c * (c + 1) / 2 - b)
if val > 0:
	print(val)
else:
	print(0)


def __starting_point():
	(k, n, w) = map(int, input().split())
	price = (w + 1) * w * k // 2
	print(max(0, price - n))
__starting_point()


(i, n, b) = map(int, input().split())
a = b / 2 * (2 * i + (b - 1) * i)
if a - n > 0:
	print(int(a - n))
else:
	print('0')


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
x = 1
s = 0
while x <= c:
	s = s + x * a
	x = x + 1
answer = s - b
if s - b >= 0:
	print(s - b)
else:
	print(0)


(k, n, w) = list(map(int, input().split()))
c = list()
d = 0
m = 0
for i in range(1, w + 1):
	c.append(i * k)
for j in c:
	d = sum(c)
m = d - n
if m <= 0:
	print('0')
else:
	print(m)


s = str(input())
n = list(s.split(' '))
banana = 0
dollars = int(n[1])
cost = int(n[0])
for i in range(1, int(n[2]) + 1):
	banana += i
borrow = banana * cost - dollars
if borrow > 0:
	print(borrow)
else:
	print(0)


def main():
	[k, n, w] = [int(_) for _ in input().split()]
	must_have = k * w * (w + 1) // 2
	must_borrow = max(must_have - n, 0)
	print(must_borrow)
main()


v = input().split(' ')
priceOfBanana = int(v[0])
savings = int(v[1])
wantedBananas = int(v[2])
neededMoney = 0
priceOfCB = 0
for banana in range(1, wantedBananas + 1):
	priceOfCB = banana * priceOfBanana
	neededMoney += priceOfCB
if savings >= neededMoney:
	print(0)
else:
	print(neededMoney - savings)


(k, doll, n) = map(int, input().split())
sm = 0
for i in range(1, n + 1):
	sm = sm + i * k
if sm < doll:
	print('0')
else:
	print(sm - doll)


x = list(map(int, input().split()))
k = x[0]
n = x[1]
w = x[2]
hasil = 0
for i in range(1, w + 1, 1):
	if i == 1:
		hasil = k
	else:
		hasil += k * i
if n >= hasil:
	print(0)
else:
	print(hasil - n)


def main():
	(k, n, w) = input().split(' ')
	k = int(k)
	n = int(n)
	w = int(w)
	totalcost = 0
	for i in range(1, w + 1):
		totalcost += k * i
	result = totalcost - n
	if result < 0:
		print('0')
	else:
		print(result)
main()


(k, n, w) = input().split()
total = 0
each = int(k)
for i in range(1, int(w) + 1):
	total = total + int(k)
	k = (i + 1) * each
result = total - int(n)
if result > 0:
	print(result)
else:
	result = 0
	print(result)


import sys
for line in sys.stdin:
	ln = line.split(' ')
	ln = [int(ele) for ele in ln]
	cost = ln[0] * (ln[2] * (ln[2] + 1) // 2)
	ret = cost - ln[1]
	if ret < 0:
		print('0')
	else:
		print(cost - ln[1])


def solve(k, n, w):
	t = k * w * (w + 1) // 2 - n
	return t * (t >= 0)
(k, n, w) = map(int, input().split())
print(solve(k, n, w))


a = [int(x) for x in input().split(' ')]
k = a[0]
n = a[1]
w = a[2]
s = k * w * (w + 1) // 2
print(max(0, s - n))


(first, rs, banana) = map(int, input().split())
s = 0
for x in range(1, banana + 1):
	s = s + first * x
if s - rs > 0:
	print(s - rs)
else:
	print(0)


inputt = list(map(int, input().split()))
cost = 0
for i in range(1, inputt[2] + 1):
	cost += inputt[0] * i
borrow = inputt[1] - cost
print(abs(borrow)) if borrow < 0 else print('0')


line_1 = list(map(int, input().split()))
count_1 = 0
count = line_1[0]
for e in range(1, line_1[2] + 1):
	count_1 = count_1 + count * e
if count_1 > line_1[1]:
	print(count_1 - line_1[1])
else:
	print('0')


line = input().split()
banana_price = int(line[0])
money = int(line[1])
banana_count = int(line[2])
total_cost = 0
for i in range(1, banana_count + 1):
	total_cost += i * banana_price
lack = 0
if money - total_cost < 0:
	lack = money - total_cost
print(abs(lack))


(k, n, w) = map(int, input().split())
x = 0
for i in range(w + 1):
	x = x + k * i
if n - x >= 0:
	print('0')
elif n - x < 0:
	print(abs(n - x))


(k, n, w) = map(int, input().split())
x = 0
for i in range(w):
	x = x + k + k * i
if x > n:
	print(x - n)
else:
	print(0)


from functools import reduce
(k, n, w) = list(map(int, input().split()))
a = k * reduce(lambda x, y: x + y, range(1, w + 1))
if a > n:
	print(a - n)
else:
	print(0)


(k, n, w) = [int(x) for x in input().split(' ')]
cost = k
for i in range(2, w + 1):
	new_cost = i * int(k)
	final_cost = cost + new_cost
	cost = final_cost
money_borrowed = cost - n
if money_borrowed > 0:
	print(money_borrowed)
else:
	print(int(0))


arr = list(map(int, input().split()))
k = arr[0]
n = arr[1]
w = arr[2]
summ = int(w * (w + 1) / 2)
tot_money = k * summ
tot_money = tot_money - n
if tot_money <= 0:
	tot_money = 0
print(tot_money)


(a, b, c) = map(int, input().split())
x = []
x.append(0)
for i in range(1, c + 1):
	x.append(i * a)
y = sum(x)
if b - y < 0:
	print(abs(b - y))
else:
	print('0')


input_data = input()
list_we_use = input_data.split(' ')
final_list = []
r = 0
for i in list_we_use:
	final_list.append(int(i))
j = final_list[2]
for i in range(1, j + 1):
	r += i * final_list[0]
if final_list[1] >= r:
	print('0')
else:
	print(r - final_list[1])


(k, n, w) = list(map(int, input().split()))
total = 0
for x in range(w):
	total += k * (x + 1)
if total <= n:
	print(0)
else:
	print(total - n)


Dat = input('')
Dat = Dat.split()
K = int(Dat[0])
N = int(Dat[1])
W = int(Dat[2])
Tot = 0
for J in range(W):
	X = K * (J + 1)
	Tot = Tot + X
Res = Tot - N
if Res < 0:
	print(0)
else:
	print(Res)


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))
d = 1
x = 0
while d != c + 1:
	x = x + d * a
	d = d + 1
z = x - b
if z > 0:
	print(z)
else:
	print(0)


def main():
	(k, n, w) = map(int, input().split())
	total_cost = k * w * (w + 1)
	total_cost = total_cost // 2
	money_he_has = n
	money_borrowed = total_cost - money_he_has
	if money_borrowed < 0:
		print(0)
	else:
		print(money_borrowed)
main()


(k, n, w) = list(map(int, input().split()))
price = w * (w + 1) / 2 * k
b = price - n
if b > 0:
	print(int(b))
else:
	print(0)


data = input()
data = data.split()
temp = []
for i in data:
	i = int(i)
	temp.append(i)
data = temp[:]
del temp
values = list()
for i in range(1, data[2] + 1):
	cost = data[0] * i
	values.append(cost)
if sum(values) > data[1]:
	print(sum(values) - data[1])
else:
	print(0)


import sys
parameters = sys.stdin.readline().rstrip().split(' ')
k = int(parameters[0])
n = int(parameters[1])
w = int(parameters[2])
costOfBanana = k
totalBananaCost = costOfBanana
nNumberOfBananas = 1
while nNumberOfBananas < w:
	nNumberOfBananas += 1
	costOfBanana = nNumberOfBananas * k
	totalBananaCost += costOfBanana
if totalBananaCost <= n:
	print(0)
else:
	print(totalBananaCost - n)


x = list(input().split(' '))
sum1 = 0
for i in range(1, int(x[2]) + 1):
	sum1 = sum1 + i * int(x[0])
b = sum1 - int(x[1])
if b > 0:
	print(b)
else:
	print(0)


(k, n, w) = map(int, input().split())
total_cost = k * w * (w + 1) // 2
borrowed_money = total_cost - n
if borrowed_money > 0:
	print(borrowed_money)
else:
	print(0)


(x, y, z) = map(int, input().split())
sum = 0
a = z
for a in range(1, z + 1):
	sum = sum + z * x
	z = z - 1
if sum > y:
	print(sum - y)
elif sum <= y:
	print(0)


def cal(k, n, w):
	total = 0
	for i in range(1, w + 1):
		total = i * k + total
	if n >= total:
		return 0
	else:
		balance = total - n
	return balance
(k, n, w) = map(int, input().split())
print(cal(k, n, w))


(k, n, w) = list(map(int, input().strip().split()))[:3]
cost = k * (w + 1) * w // 2
if cost <= n:
	print(0)
else:
	print(cost - n)


import sys
import random
from math import log2, log, ceil
input = sys.stdin.readline

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a > 0:
		return gcd(b % a, a)
	return b

def primefs(n):
	if n == 1:
		return 1
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	while x != link[x]:
		x = link[x]
	return x

def union(x, y, size, link):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().split()))
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
(k, n, w) = int_array()
total = k * (w * (w + 1) // 2)
print(max(total - n, 0))


k = input().split(' ')
a = int(k[0])
b = int(k[1])
c = int(k[2])
e = 0
e = c * (c + 1) * a / 2
f = e - b
f = int(f)
if f < 0:
	print(0)
else:
	print(f)


n = list(map(int, input().split()))
sum = 0
bor = 0
for i in range(n[2]):
	sum = sum + (i + 1) * n[0]
bor = int(sum - n[1])
if bor < 0:
	print('0')
else:
	print(bor)


data = input().split()
(k, n, w) = (int(data[0]), int(data[1]), int(data[2]))
s = int(k * ((w + w * w) * 0.5))
print([0, s - n][s > n])


(cost, dollars, n) = (int(x) for x in input().split())
total = 0

def banana(num):
	a = int(num) * cost
	return int(a)
for x in range(n):
	total += banana(x + 1)
if dollars > total:
	print('0')
else:
	print(total - dollars)


(k, n, w) = [int(x) for x in input().split()]
cost = (k + w * k) * w / 2
borrow = abs(n - cost)
if cost > n:
	print(int(borrow))
else:
	print(0)


def main():
	i = input().split()
	k = int(i[0])
	n = int(i[1])
	w = int(i[2])
	s = w * (w + 1) / 2
	t = int(s * k)
	b = t - n
	if b > 0:
		print(t - n)
	else:
		print(0)
main()


def money():
	(k, n, w) = map(int, input().split())
	cost = 0
	i = 1
	while i <= w:
		cost = cost + i * k
		i += 1
	if n >= cost:
		borrow = 0
	else:
		borrow = cost - n
	print(borrow)
money()


(a, b, c) = [int(x) for x in input().split()]
sum = 0
for x in range(1, c + 1):
	sum += x * a
if sum <= b:
	print('0')
else:
	print(sum - b)


(k, n, w) = map(int, input().split())
suum = 0
while w > 0:
	suum += w
	w -= 1
need = suum * k - n
if need >= 0:
	print(need)
else:
	print(0)


(k, n, w) = list(map(int, input().split()))
q = 0
for i in range(1, w + 1):
	q += i * k
print([0, q - n][q > n])


(k, n, w) = [int(i) for i in input().split()]
v = []
h = 1
for i in range(1, w + 1):
	h = h * i * k
	v.append(h)
	h = 1
hv = sum(v) - n
if hv >= 0:
	print(hv)
else:
	print(0)


def main():
	arr = input().split()
	k = int(arr[0])
	w = int(arr[1])
	n = int(arr[2])
	if k * n * (n + 1) / 2 > w:
		print(int(k * n * (n + 1) / 2 - w))
	else:
		print(0)
main()


(K, W, N) = map(int, input().split(' '))
price = 0
for i in range(1, N + 1):
	price += i * K
if price > W:
	diff = price - W
	print(diff)
else:
	print(0)


(k, n, w) = map(int, input().split())
i = 1
soldi = 0
for i in range(1, w + 1):
	soldi = soldi + i * k
mancanti = soldi - n
if mancanti > 0:
	print(mancanti)
else:
	print(0)


(banana_cost, dollars_have, bananas_want) = map(int, input().split())
ans = 0
for i in range(bananas_want):
	ans = ans + banana_cost * (i + 1)
dollars_to_borrow = ans - dollars_have
if dollars_to_borrow < 0:
	print(0)
else:
	print(dollars_to_borrow)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
L = inlt()
k = L[0]
n = L[1]
w = L[2]
a = int(k * w * (w + 1) / 2)
if n >= a:
	print(0)
else:
	print(a - n)


def absolute(x):
	if x <= 0:
		return 0
	else:
		return x

def solve(k, n, w):
	return absolute(k * (w * (w + 1) // 2) - n)
(k, n, w) = [int(x) for x in input().split(' ')]
print(solve(k, n, w))


s = [int(a) for a in input().split(' ')]
result = 0
for i in range(1, s[2] + 1):
	result += s[0] * i
result -= s[1]
if result > 0:
	print(result)
else:
	print('0')


(k, n, w) = map(int, input().split())
price = 0
for _ in range(1, w + 1):
	price += _ * k
print(price - n) if price > n else print(0)


(inicost, money, number) = [int(x) for x in input().split()]
sumcost = 0
for i in range(number):
	sumcost += i + 1
allcost = inicost * sumcost
borrow = allcost - money
if borrow <= 0:
	print(0)
else:
	print(borrow)


import sys
input = sys.stdin.readline

def main():
	(k, n, w) = map(int, input().split())
	money = k * w * (w + 1) // 2
	print(max(0, money - n))
main()


z = input
(k, n, w) = map(int, z().split())
n1 = k * (w * (w + 1) / 2)
print(0 if n1 <= n else int(n1 - n))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
count = 0
count2 = 0
for i in range(1, w + 1):
	count = i * k
	count2 += count
if n < count2:
	print(count2 - n)
else:
	print('0')


(k, x, n) = input().split()
(k, x, n) = (int(k), int(x), int(n))
temp = 0
for i in range(n):
	temp += (i + 1) * k
if temp <= x:
	print(0)
else:
	print(temp - x)


numero = [int(x) for x in input().split()]
costo = numero[0] * int(numero[2] * (numero[2] + 1) / 2)
if costo <= numero[1]:
	print(0)
else:
	print(costo - numero[1])


n = [int(n) for n in input().split()]
c = n[0]
r = n[1]
b = n[2]
sum = 0
for i in range(1, b + 1):
	sum = sum + i * c
l = sum - r
if l > 0:
	print(l)
else:
	print('0')


s = list(input().split())
k = int(s[0])
n = int(s[1])
w = int(s[2])
cost = w * (w + 1) / 2 * k
if cost > n:
	print(int(cost - n))
else:
	print('0')


d = str(input())
d1 = d.split()
k = int(d1[0])
n = int(d1[1])
w = int(d1[2])
ans = 0
while w > 0:
	ans += w * k
	w -= 1
if n < ans:
	print(ans - n)
else:
	print(0)


integers = input()
temp = integers.split(' ')
allcost = 0
for i in range(1, int(temp[2]) + 1):
	allcost = allcost + int(temp[0]) * i
if int(temp[1]) - allcost < 0:
	print(-(int(temp[1]) - allcost))
else:
	print(0)


from collections import defaultdict as dd
from collections import Counter as ccd
from itertools import permutations as pp
from itertools import combinations as cc
from random import randint as rd
from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq as hq
import math
mod = pow(10, 9) + 7

def inp(flag=0):
	if flag == 0:
		return list(map(int, input().strip().split(' ')))
	else:
		return int(input())
(k, n, w) = inp()
print(max(0, -n + k * w * (w + 1) // 2))


l = list(map(int, input().split()))
k = l[0]
n = l[1]
w = l[2]
cost = k
i = 1
borrow = 0
while i <= w:
	cost = i * k
	if n - cost > 0 or n - cost == 0:
		n -= cost
	elif n - cost < 0:
		cost -= n
		borrow += abs(cost)
		n = 0
	i += 1
print(borrow)


def answer():
	a = input().split()
	(k, n, w) = (int(a[0]), int(a[1]), int(a[2]))
	mid = k * w * (w + 1) / 2 - n
	if mid < 0:
		return 0
	else:
		return int(mid)
print(answer())


import sys
import math
from collections import *

def get_ints():
	return map(int, input().split())

def get_list():
	return list(get_ints())

def printspx(*args):
	return print(*args, end='')

def printsp(*args):
	return print(*args, end=' ')
UGLYMOD = int(1000000000.0 + 7)
SEXYMOD = 998244353
MAXN = int(100000.0)
(k, n, w) = get_ints()
print(max(0, k * (w * (w + 1)) // 2 - n))


x = input()
l = x.split()
m = int(l[0])
d = int(l[1])
f = int(l[2])
o = 0
for i in range(f):
	o = o + m * (i + 1)
if o - d <= 0:
	print('0')
else:
	print(o - d)


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def upper_bound(a, x, lo=0, hi=None):
	if hi == None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations

def solve():
	(k, n, w) = map(int, input().split())
	print(max(k * (w * (w + 1) // 2) - n, 0))
for _ in range(1):
	solve()


(x, y, z) = map(int, input().split())
(sub, m) = (0, 0)
for i in range(1, z + 1):
	m += i * x
sub = m - y
if sub <= 0:
	sub = 0
print(sub)


(cost_k, dollars, bananas) = map(int, input().split())
total = 0
for i in range(1, bananas + 1):
	total = total + i * cost_k
if dollars < total:
	print(total - dollars)
else:
	print('0')


(k, n, w) = [int(s) for s in input().split()]
s = (k + k * w) * w // 2
print(max(s - n, 0))


(k, n, w) = map(int, input().split())
banansum = 0
for i in range(w + 1):
	banancost = i * k
	banansum = banansum + banancost
if banansum > n:
	print(banansum - n)
else:
	print(0)


import sys
import io
import os
total = 0
failed = 0

def run(test, res):
	x = io.StringIO()
	with io.StringIO(test) as sys.stdin:
		with x as sys.stdout:
			work()
			z = x.getvalue().strip()
	sys.stdout = sys.__stdout__
	print('Passed?', z == res)
	print('Expected: ', res)
	print('Actual  : ', z)
	global total, failed
	total += 1
	failed += 1 if z != res else 0

def work():
	(k, n, w) = map(int, input().split())
	s = w * (w + 1) // 2
	print(max(0, s * k - n))

def test():
	run('3 17 4', '13')
	run('1 2 1', '0')
if 'LOCALTEST' in os.environ:
	test()
	print('\n Result: %s (%d total, %d failed)' % ('FAILED' if failed > 0 else 'PASSED', total, failed))
else:
	work()


lst = list(map(int, input().split()))
(k, n, w) = [lst[i] for i in range(0, 3)]
price = k
for i in range(2, w + 1):
	price = price + i * k
if price <= n:
	print(0)
elif price >= n:
	print(price - n)


(n, b, w) = map(int, input().split())
ans = w * (w + 1) // 2 * n - b
if ans > 0:
	print(ans)
else:
	print('0')


(k, n, w) = input().split()
w = int(w)
n = int(n)
k = int(k)
a = k
c = 0
for i in range(w):
	c = k + c
	k = k + a
if n > c:
	print('0')
else:
	print(c - n)


initial = input().split()
(k, n, w) = (int(initial[0]), int(initial[1]), int(initial[2]))
money_for_banana = 0
for i in range(1, w + 1):
	money_for_banana += i * k
if n - money_for_banana < 0:
	print(abs(n - money_for_banana))
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
for x in range(0, w):
	w += x
b = 0
if n - k * w < 0:
	b = abs(n - k * w)
else:
	b = 0
print(b)


(c, d, b) = map(int, input().split())
tot = 0
for i in range(1, b + 1):
	tot = tot + c * i
ans = tot - d
if ans > 0:
	print(ans)
else:
	print(0)


(k, n, w) = list(map(int, input().split()))
print(max(0, sum((k * i for i in range(1, w + 1))) - n))


import sys

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s)
	sys.stdout.write('\n')

def wi(n):
	sys.stdout.write(str(n))
	sys.stdout.write('\n')

def wia(a, sep=' '):
	sys.stdout.write(sep.join([str(x) for x in a]))
	sys.stdout.write('\n')

def main():
	(k, n, w) = ria()
	ans = max((k + w * k) * w // 2 - n, 0)
	wi(ans)
main()


selection = str(input())
k = int(selection.split()[0])
n = int(selection.split()[1])
w = int(selection.split()[2])
cost = 0
for i in range(1, w + 1):
	cost += i * k
if n < cost:
	print(cost - n)
else:
	print(0)


(x, y, z) = input().split()

def total(a, d):
	b = a * (a + 1)
	c = b // 2
	e = c * d
	return e
price = total(int(z), int(x))
rent = price - int(y)
if rent > 0:
	print(rent)
else:
	print(0)


input_data = input()
list_we_use = input_data.split(' ')
h = []
w = 0
for i in list_we_use:
	h.append(int(i))
l = h[2]
for i in range(1, l + 1):
	w += i * h[0]
if h[1] >= w:
	print('0')
else:
	print(w - h[1])


user_input = input().split()
banana_price = int(user_input[0])
dollars = int(user_input[1])
no_of_bananas = int(user_input[2])
banana_cost = banana_price
for i in range(2, no_of_bananas + 1):
	banana_cost += i * banana_price
if banana_cost - dollars < 0:
	print(0)
else:
	print(banana_cost - dollars)


inp = [int(x) for x in input().split()]
a = inp[2]
c = (a + 1) * (a / 2)
d = c * inp[0]
hasil = int(d - inp[1])
if hasil < 0:
	print('0')
else:
	print(int(hasil))


a = input()
l = []
l = a.split(' ')
k = int(l[0])
n = int(l[1])
w = int(l[2])
b = k * w * (w + 1) / 2
if b > n:
	print(str(int(b - n)))
else:
	print('0')


w = input().split(' ')
p = 0
for i in range(1, int(w[2]) + 1):
	p = p + int(w[0]) * i
if p <= int(w[1]):
	print('0')
else:
	a = p - int(w[1])
	print(a)


(k, n, w) = [int(p) for p in input().split()]
c = k * ((w ** 2 + w) // 2)
if c > n:
	print(abs(n - c))
else:
	print(0)


(n, k, w) = list(map(int, input().rstrip().split()))
m = []
for i in range(1, w + 1):
	m.append(n * i)
if sum(m) - k <= 0:
	print(0)
else:
	print(sum(m) - k)


def getlist(tcast):
	return [tcast(x) for x in input().strip().split(' ')]

def getvar(tcast):
	return tcast(input().strip())

def getmatrix(r, tcast):
	mat = []
	for i in range(r):
		mat.append(getlist(tcast))
	return mat
(k, n, w) = getlist(int)
res = k * (w * (w + 1)) // 2 - n
print(max(0, res))


L = list(map(int, input().rstrip().split()))
s = L[0] * (L[2] * (L[2] + 1) // 2)
if s > L[1]:
	print(s - L[1])
else:
	print(0)


(k, n, w) = map(int, input().split())
import math
liste = []
for x in range(1, w + 1):
	liste.append(x)
b = int(math.fsum(liste))
anan = k * b
if n > anan:
	print(0)
else:
	print(anan - n)


(fb, m, n) = map(int, input().split())
cost = n * (n + 1) / 2 * fb
if cost > m:
	borrow = cost - m
else:
	borrow = 0
print(int(borrow))


s = input().split(' ')
k = int(s[0])
n = int(s[1])
w = int(s[2])

def numbana(number, initial):
	cost = 0
	for i in range(number):
		cost += (i + 1) * initial
	return cost
result = numbana(w, k) - n
if result < 0:
	print('0')
else:
	print(result)


s = input().split()
c = int(s[0])
ima = int(s[1])
w = int(s[2])
cijena = 0
for i in range(1, w + 1):
	cijena += i * c
tr = cijena - ima
if cijena > ima:
	print(tr)
else:
	print(0)


def price(k, w):
	result = 0
	for i in range(1, w + 1):
		result += i * k
	return result
(k, n, w) = [int(elem) for elem in input().split()]
if price(k, w) > n:
	print(price(k, w) - n)
else:
	print(0)


(k, n, w) = map(int, input().split())
pay = 0
for x in range(1, w + 1):
	pay = pay + k * x
pay = n - pay
if pay >= 0:
	borow = 0
else:
	borow = abs(pay)
print(borow)


m = [int(x) for x in input().split(' ')]
k = m[0]
n = m[1]
w = m[2]
i = 0
g = 0
while i < w:
	g += (i + 1) * k
	i += 1
if g > n:
	print(g - n)
else:
	print(0)


def xu(m, n):
	count = 0
	for i in range(n):
		count = count + m * (i + 1)
	return count
(m, s, n) = [int(x) for x in input().split()]
if xu(m, n) - s > 0:
	print(xu(m, n) - s)
else:
	print(0)


def money_for_buy_banana(cost, k):
	sum = 0
	for i in range(1, k + 1):
		sum += cost * i
	return sum
indata = input().split(' ')
k = int(indata[0])
n = int(indata[1])
w = int(indata[2])
o = money_for_buy_banana(k, w) - n
if o > 0:
	print(str(o))
else:
	print('0')


from sys import stdin

def main():
	inpts = [int(x) for x in stdin.read().split()]
	price = inpts[0]
	money = inpts[1]
	bananas = inpts[2]
	bananas_costs = 0
	for i in range(0, bananas):
		bananas_costs += (i + 1) * price
	print(bananas_costs - money) if bananas_costs > money else print(0)
main()


s = input()
l = s.split(' ')
k = int(l[0])
n = int(l[1])
w = int(l[2])
sum = k * w * (w + 1) // 2
if n >= sum:
	print(0)
else:
	print(sum - n)


(K, N, W) = map(int, input().split())
sum = 0
for i in range(1, W + 1):
	sum += K * i
if sum < N:
	print(0)
else:
	print(sum - N)


(a, b, c) = map(int, input().split())
x = 1
razer = 0
for y in range(c):
	count = x * a
	x += 1
	razer += count
if razer - b > 0:
	print(razer - b)
else:
	print(0)


list1 = input().split()
k = int(list1[0])
n = int(list1[1])
w = int(list1[2])
sum1 = 0
for i in range(0, w + 1):
	sum1 += i * k
diff = sum1 - n
if diff >= 0:
	print(diff)
elif diff < 0:
	print(0)


(k, n, w) = input().split(' ')
t = int(w) * (int(w) + 1) * int(k) * 0.5
ans = t - int(n)
if ans < 0:
	print(0)
else:
	print(int(ans))


(a, b, c) = map(int, input().strip().split())
s = a * c * (c + 1) / 2
if b > s:
	print('0')
else:
	print(int(s - b))


data = input()
data_list = data.split(' ')
k = int(data_list[0])
n = int(data_list[1])
w = int(data_list[2])
counter = 1
total = 0
while counter <= w:
	total = total + counter
	counter = counter + 1
total = total * k
difference = total - n
if difference > 0:
	print(difference)
else:
	print('0')


(a, b, c) = list(map(int, input().split()))
cost = c * (c + 1) // 2 * a
if b >= cost:
	print('0')
else:
	print(cost - b)


(k, n, w) = map(int, input().split())
lst = []
for item in range(1, w + 1):
	result = item * k
	lst.append(result)
summ = sum(lst)
if n - summ >= 0:
	print(0)
else:
	res = n - summ
	print(abs(res))


a = []
line = input()
if line:
	for i in line.split():
		a.append(int(i))
	k = a[0]
	n = a[1]
	w = a[2]
	ans = 0
	for i in range(0, w):
		ans += (i + 1) * k
	if ans > n:
		print(ans - n)
	else:
		print(0)


inp = input()
info = inp.split()
k = int(info[0])
n = int(info[1])
w = int(info[2])
sum = w * (w + 1) / 2
result = int(sum * k - n)
if result < 0:
	print(0)
else:
	print(result)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
sum = 0
lst = []
for a in range(1, w + 1):
	lst.append(sum + a * k)
total = 0
for ele in range(0, len(lst)):
	total = total + lst[ele]
diff = total - n
if diff > 0:
	print(diff)
else:
	print('0')


(price_one, count_dollars, count_banana) = map(int, input().split(' '))
total_price = 0
for i in range(1, count_banana + 1):
	total_price += price_one * i
if count_dollars >= total_price:
	print(0)
else:
	print(total_price - count_dollars)


import sys
(k, n, w) = map(int, input().split(' '))
if k * w * (w + 1) / 2 < n:
	print(0)
	return
print(int(k * w * (w + 1) / 2 - n))


def hazineh(gh, te):
	hazine = 0
	zarib = 1
	while te > 0:
		hazine = hazine + zarib * gh
		zarib = 1 + zarib
		te = te - 1
	return hazine
i = input().split(' ')
h = hazineh(int(i[0]), int(i[2]))
if h < int(i[1]):
	print(0)
else:
	print(h - int(i[1]))


from sys import stdout
data = input().split()
firstBanana = int(data[0])
initialFunds = int(data[1])
wantedBananas = int(data[2])
requiredFunds = 0
for i in range(1, wantedBananas + 1):
	requiredFunds += i
requiredFunds *= firstBanana
requiredFunds -= initialFunds
requiredFunds = requiredFunds if requiredFunds > -1 else 0
stdout.write(str(requiredFunds))


(n, k, q) = list(map(int, input().split()))
i = 1
sum1 = 0
while i <= q:
	sum1 += n * i
	i += 1
borrow = sum1 - k
if borrow < 0 or borrow == 0:
	print(0)
else:
	print(borrow)


(k, n, w) = tuple(input().split(' '))
k = int(k)
n = int(n)
w = int(w)
sum = int(w / 2 * (k + w * k))
sum -= n
if sum > 0:
	print(sum)
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
ki = k
cost = 0
for i in range(w):
	cost = cost + ki
	ki = k * (i + 2)
m = cost - n
if m < 0:
	print(0)
else:
	print(m)


_str = input()
_str = _str.split(' ')
k = int(_str[0])
n = int(_str[1])
w = int(_str[2])
v = int(k * (w * (w + 1) / 2) - n)
if v < 0:
	print(0)
else:
	print(v)


def ans(k, n, w):
	s = w * (w + 1) * k / 2
	return max(s - n, 0)
(k, n, w) = map(int, input().split())
print(int(ans(k, n, w)))


(k, n, w) = list(map(int, input().split()))
total_cost = 0
for i in range(1, w + 1):
	total_cost += i * k
if total_cost < n or total_cost == n:
	print(0)
elif total_cost > n:
	print(total_cost - n)


a = input()
a = [int(x) for x in a.split()]
sum = 0
for i in range(1, a[2] + 1):
	sum = sum + i * a[0]
rem = sum - a[1]
if rem > 0:
	print(rem)
else:
	print('0')


import sys
inf = sys.stdin
temp = inf.readline()
data = [int(i) for i in temp.split(' ')]
k = data[0]
n = data[1]
w = data[2]
cost = 0
for i in range(1, w + 1):
	cost += i * k
print(cost - n if cost > n else 0)


def calcCost(cost, ith_banana, total_bananas):
	ith_banana += 1
	if ith_banana >= total_bananas:
		return ith_banana * cost
	return cost * ith_banana + calcCost(cost, ith_banana, total_bananas)
inp = input()
arr = inp.split(' ')
initCost = int(arr[0])
currentMoney = int(arr[1])
totalBananas = int(arr[2])
x = 0
ith_banana = 0
currBanana = 0
while ith_banana < totalBananas:
	currBanana = min(currBanana + 100, totalBananas)
	totalCost = calcCost(int(initCost), ith_banana, currBanana)
	x += totalCost
	ith_banana += 100
x -= int(currentMoney)
if x > 0:
	y = x
else:
	y = 0
print(str(y))


s = input()
j = list(map(int, s.split(' ')))
k = j[0]
n = j[1]
w = j[2]
t = int(k * (w * (w + 1) / 2) - n)
if t >= 0:
	print(t)
else:
	print(0)


(k, n, w) = (int(x) for x in input().split())
ans = sum((k * (x + 1) for x in range(w))) - n
if ans <= 0:
	print(0)
else:
	print(ans)


(k, n, w) = map(int, input().split())
cost = sum([k * x for x in range(1, w + 1)])
print([0, cost - n][n < cost])


(z, x, c) = [int(i) for i in input().split()]
s = 0
for i in range(1, c + 1):
	s += z * i
if s > x:
	print(s - x)
else:
	print(0)


n = input().split()
k = int(n[0])
e = int(n[1])
w = int(n[2])
a = 0
i = 1
while i <= w:
	a += i * k
	i += 1
if a >= e:
	print(a - e)
else:
	print(0)


arr = list(map(int, input().split()))
sum = 0
for i in range(1, arr[-1] + 1):
	sum = sum + arr[0] * i
if sum - arr[1] > 0:
	print(sum - arr[1])
else:
	print(0)


v = input().split()
k = int(v[0])
n = int(v[1])
w = int(v[2])
c = 0
for i in range(1, w + 1):
	c += i * k
print(c - n if c > n else 0)


knw = input().split(' ')
price = int(knw[0])
has = int(knw[1])
amt = int(knw[2])
needs = 0
i = 0
while i < amt:
	needs += (i + 1) * price
	i += 1
print(max(needs - has, 0))


(first_banana_prise, soldier_money, bananas_count) = [int(x) for x in input().split()]
totalPrise = first_banana_prise * ((pow(bananas_count, 2) + bananas_count) / 2)
soldier_friend_money = totalPrise - soldier_money
if soldier_friend_money < 0:
	soldier_friend_money = 0
print(int(soldier_friend_money))


(k, ba, n) = list(map(int, input().split()))
p = n * (n + 1) / 2
s = k * p
if s > ba:
	print(int(s - ba))
else:
	print(0)


x = input()
c = x.split(' ')
a = []
vb = 0
ban = 0
for i in c:
	a.append(int(i))
ban = a[2]
for i in range(1, ban + 1):
	vb += i * a[0]
if a[1] >= vb:
	print(0)
else:
	print(vb - a[1])


(cost, b, much) = input().split()
cost = int(cost)
b = int(b)
much = int(much)
if (much + 1) * cost / 2 * much <= b:
	print(0)
else:
	print(int((much + 1) * cost / 2 * much - b))


[k, n, w] = [int(a) for a in input().strip().split(' ')]
ans = w * (w + 1) // 2 * k - n
if ans < 0:
	ans = 0
print(ans)


v = input().split(' ')
v = [int(x) for x in v]
i = 1
price = v[0]
dollars = v[1]
for x in range(v[2]):
	dollars -= i * price
	i += 1
if dollars > 0:
	print(0)
else:
	print(abs(dollars))


(firstNan, wallet, totalNan) = [int(i) for i in input().split()]
listX = []
for i in range(1, totalNan + 1):
	z = i * firstNan
	listX.append(z)
thaSUM = sum(listX)
if wallet >= thaSUM:
	print('0')
else:
	print(thaSUM - wallet)


s = input().split()
n = int(s[2])
cost = int(s[0]) * n * (n + 1) / 2
if cost > int(s[1]):
	print(int(cost - int(s[1])))
else:
	print('0')


import sys
numlines = 1
total = 0
for line in sys.stdin:
	line = line[:len(line) - 1]
	(k, n, w) = line.split(' ')
	for i in range(1, int(w) + 1):
		total += int(k) * i
	numlines -= 1
	if numlines == 0:
		break
final = total - int(n)
if final <= 0:
	final = 0
print(final)


def f(k, n, f):
	s = (k + n * k) * n // 2
	d = s - f
	return 0 if d < 0 else d
(k, w, n) = input().split()
print(f(int(k), int(n), int(w)))


def ans(arr):
	(k, n, w) = (arr[0], arr[1], arr[2])
	cnt = 0
	for i in range(1, w + 1):
		cnt += k * i
	if n < cnt:
		return abs(n - cnt)
	else:
		return 0
knw = list(map(int, input().strip().split()))
print(ans(knw))


inp = [int(x) for x in input().split()]
cost = inp[0]
initial = inp[1]
bananas = inp[2]
total = cost * (bananas * (bananas + 1)) / 2
if initial < total:
	print(int(total - initial))
else:
	print('0')


(k, n, b) = map(int, input().split(' '))
a = b * (b + 1) // 2 * k - n
if a < 0:
	a = 0
print(a)


s = input().split()
s[0] = int(s[0])
s[1] = int(s[1])
s[2] = int(s[2])
k = s[0]
j = 1
summ = 0
for i in range(s[2]):
	o = j * s[0]
	j += 1
	summ += o
if summ - s[1] <= 0:
	print(0)
else:
	print(summ - s[1])


(price, money, bana) = [int(i) for i in input().split()]
x = price * (bana * (bana + 1)) / 2 - money
if x > 0:
	print(int(x))
else:
	print(0)


import math
(k, n, w) = map(int, input().split())
i = 0
while i <= w:
	s = i * k
	n = n - s
	i = i + 1
if n > 0:
	print('0')
	exit(0)
n = n * -1
print(n)


(k, n, w) = map(int, input().split())
S = 0
Count = 0
while Count < w:
	Count += 1
	S = S + Count * k
if S > n:
	print(S - n)
else:
	print(0)


entrada = input().split(' ')
preco = int(entrada[0])
carteira = int(entrada[1])
want = int(entrada[2])
total = 0
for i in range(1, want + 1):
	total += preco * i
if carteira - total < 0:
	print(abs(carteira - total))
else:
	print(0)


def total_sum(w):
	sum = 0
	while w != 0:
		sum = sum + w
		w = w - 1
	return sum
s = list(map(int, input().split()))
k = s[0]
n = s[1]
w = s[2]
money = k * total_sum(w)
if money - n < 0:
	print('0')
else:
	print(money - n)


(k, n, w) = map(int, input().split())
i = 0
count = 0
money = n
while money > 0:
	if i == w:
		break
	i += 1
	money = money - i * k
remain = w - i
for j in range(i + 1, w + 1):
	count += j * k
final_money = count + abs(money)
if remain == 0:
	if money > 0:
		print(0)
	else:
		print(abs(money))
else:
	print(final_money)


s = input().split()
k = eval(s[0])
n = eval(s[1])
w = int(s[2])
out = k * w * (w + 1) // 2 - n
if out > 0:
	print(out)
else:
	print(0)


n = list(map(int, list(input().split())))
p = n[0] * ((1 + n[2]) * n[2] // 2)
if p > n[1]:
	print(p - n[1])
else:
	print(0)


a = input().split()
a = [int(i) for i in a]
w = a[2]
k = a[0]
print(max(0, int(w * (w + 1) / 2 * k - a[1])))


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
fromi = w * (w + 1) // 2
if n < fromi * k:
	print(abs(n - fromi * k))
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
sum = 0
start = 1
while start <= w:
	sum = sum + start * k
	start += 1
borrow = sum - n
if sum <= n:
	print(0)
elif sum > n:
	print(borrow)


li = list(map(int, input().strip().split()))
total = li[1]
for i in range(li[2]):
	total -= li[0] * (i + 1)
if total < 0:
	print(-total)
else:
	print(0)


def main():
	(k, n, w) = map(int, input().split())
	totalm = int(w * (w + 1) * k / 2)
	if totalm - n > 0:
		print(totalm - n)
	else:
		print('0')
main()


(k, n, w) = [int(item) for item in input().split(' ')]
print(max(0, k * int(0.5 * w * (w + 1)) - n))


(k, n, w) = input().split()
p = 0
for i in range(0, int(w)):
	p += (i + 1) * int(k)
if p > int(n):
	b = p - int(n)
	print(b)
else:
	print(0)


s = input().split()
c = 0
for i in range(int(s[2])):
	c += int(s[0]) * (1 + i)
if c < int(s[1]):
	print(0)
else:
	print(abs(c - int(s[1])))


lt = input().split(' ')
k = int(lt[0])
n = int(lt[1])
w = int(lt[2])
x = int(w * (w + 1) / 2 * k - n)
print(['0', x][x >= 0])


(k, n, w) = map(int, input().split())
haha = []
result = []
for i in range(1, w + 1):
	haha.append(i)
for i in haha:
	result.append(i * k)
final = sum(result) - n
if final <= 0:
	print(0)
else:
	print(final)


n = input().split(' ')
n = list(map(int, n))
m = 0
r = 0
for i in range(n[2]):
	m += (i + 1) * n[0]
r = m - n[1]
if r > 0:
	print(r)
else:
	print(0)


n = list(map(int, input().split()))
a = [i * n[0] for i in range(1, n[2] + 1)]
print(max(0, sum(a) - n[1]))


(k, x, w) = map(int, input().split())
z = int(k * ((w ** 2 + w) / 2) - x)
if z > 0:
	print(z)
else:
	print(0)


import math
(k, n, w) = map(int, input().split())
x = k * (w * (w + 1)) / 2
if n >= x:
	print(0)
else:
	print(int(x) - n)


(k, n, w) = map(int, input().split())
a = []
for i in range(w + 1):
	a.append(k * i)
s = sum(a)
ans = s - n
if n >= s:
	print('0')
else:
	print(abs(ans))


a = list(map(int, input().split()))
sun = 0
i = 0
while i <= a[2]:
	sun += i
	i += 1
sun *= a[0]
bourt = a[1] - sun
if bourt > 0:
	bourt = 0
print(-bourt)


try:
	(k, n, w) = list(map(int, input().split()))
	sum = 0
	j = 1
	while j <= w:
		sum = sum + j * k
		j = j + 1
	res = sum - n
	if res < 0:
		print(0)
	else:
		print(res)
except:
	pass


x = list(map(int, input().split(' ')))
per_price = x[0]
have_money = x[1]
total_banana = x[2]
s = 0
for i in range(1, total_banana + 1):
	s = s + per_price * i
if have_money - s >= 0:
	print(0)
else:
	print(s - have_money)


(k, n, w) = map(int, input().split())
i = 1
li = []
while i <= w:
	temp = i * k
	li.append(temp)
	i += 1
sum = sum(li)
if sum <= n:
	print(0)
else:
	print(sum - n)


(k, n, w) = map(int, input().split())
i = 1
b = 0
while i <= w:
	b = b + i * k
	i += 1
d = b - n
if d > 0:
	print(d)
else:
	print(0)


(k, n, w) = map(int, input().split())
print(abs(min(0, n - sum((k * (x + 1) for x in range(w))))))


(k, amt, N) = map(int, input().split())
res = 0
for i in range(1, N + 1):
	res += k * i
print(res - amt if res > amt else 0)


(k, n, m) = input().split(' ')
a = 0
for i in range(1, int(m) + 1):
	a += i * int(k)
if a > int(n):
	print(a - int(n))
else:
	print('0')


x = list(input().split(' '))
total = 0
if int(x[0]) >= 1 and int(x[1]) >= 0 and (int(x[1]) <= 10 ** 9) and (int(x[2]) <= 1000):
	for i in range(1, int(x[2]) + 1):
		total += int(x[0]) * i
if total <= int(x[1]):
	print(0)
else:
	print(total - int(x[1]))


def calculatePrice(k, n, w):
	sum = w * (w + 1) / 2
	price = sum * k
	priceRequired = price - n
	if int(priceRequired) > 0:
		return int(priceRequired)
	else:
		return 0
n = list(map(int, input().split()))
print(calculatePrice(n[0], n[1], n[2]))


t = input()
num = [int(n) for n in t.split()]
k = num[0]
n = num[1]
w = num[2]
a = -n + w * (w + 1) * k / 2
if a > 0:
	print(int(a))
else:
	print('0')


(k, m, w) = [int(a) for a in input().split(' ')]
cost = 0
for i in range(1, w + 1):
	cost += i * k
if cost > m:
	print(cost - m)
else:
	print(0)


(cost, money, quantity) = map(int, input().split())
price = 0
for i in range(1, quantity + 1):
	price = price + i * cost
if price > money:
	print(price - int(money))
else:
	print('0')


(k, n, w) = map(int, input().split())
zanimayemaya_summa = 0
obschaya_summa = 0
for i in range(w + 1):
	obschaya_summa += i * k
	zanimayemaya_summa = obschaya_summa - n
	if n >= obschaya_summa:
		zanimayemaya_summa = 0
print(zanimayemaya_summa)


(k, n, w) = map(int, input().split())
l = []
for i in range(1, w + 1):
	d = i * k
	l.append(d)
if sum(l) >= n:
	a = sum(l) - n
	print(a)
elif sum(l) < n:
	print('0')


num1 = list(map(int, input().split()))
a = num1[0] * num1[2] * (num1[2] + 1) / 2
b = int(a - num1[1])
if b > 0:
	print(b)
else:
	print(0)


(k, n, w) = map(int, input().split())
print([0, int(w * (k + w * k) / 2 - n)][n < w * (k + k * w) / 2])


(k, n, w) = tuple(map(int, input().strip(' ').split(' ')))
burrow = n - sum([i * k for i in range(1, w + 1)])
if burrow < 0:
	print(abs(burrow))
else:
	print(0)


(k, n, w) = map(int, input().split())
cost = 0
for i in range(1, w + 1):
	cost = cost + i * k
b = max(cost - n, 0)
print(b)


(k, n, w) = map(int, input().split())

def price(x):
	return x * k
needed = sum(map(price, range(1, w + 1)))
borrow = needed - n
if borrow > 0:
	print(borrow)
else:
	print(0)


(a, b, c) = input().split()
a = int(a, 10)
b = int(b, 10)
c = int(c, 10)
cost = a * c * (c + 1) / 2
if cost > b:
	print(int(cost - b))
else:
	print('0')


t = input().split()
(k, n, w) = (int(t[0]), int(t[1]), int(t[2]))
s = k * w * (w + 1) / 2
print(max(int(s - n), 0))


def banany(k, n, w):
	(reality, wanted) = (0, 0)
	for i in range(1, w + 1):
		wanted += k * i
	if wanted - n > 0:
		return wanted - n
	return 0
(K, N, W) = [int(x) for x in input().split()]
print(banany(K, N, W))


(first, second, third) = input().split(' ')
k = int(first)
n = int(second)
w = int(third)
i = 1
totalCost = 0
while i <= w:
	totalCost += i * k
	i += 1
difference = totalCost - n
if difference > 0:
	print(difference)
else:
	print(0)


import sys
f = sys.stdin
(k, n, w) = map(int, f.readline().split())
r = sum([i * k for i in range(1, w + 1)]) - n
print(0 if r < 0 else r)


str = input().split()
k = int(str[0])
n = int(str[1])
w = int(str[2])
total_money = 0
if 1 <= k and w <= 1000 and (0 <= n <= 10 ** 9):
	for i in range(w):
		total_money = total_money + k * (i + 1)
total_money = total_money - n
if total_money < 0:
	print(0)
else:
	print(total_money)


(k, n, w) = map(int, input().split())
s = k * sum(range(1, w + 1)) - n
print(s * (s > 0))


order = [int(s) for s in input().split()]
total = 0
for multiple in range(order[2] + 1):
	total += order[0] * multiple
if total - order[1] <= 0:
	print(0)
else:
	print(total - order[1])


(k, n, w) = input().split()
needed = sum(((i + 1) * int(k) for i in range(int(w))))
diff = int(n) - needed
if diff >= 0:
	print('0')
else:
	print(abs(diff))


(k, n, w) = map(int, input().split())
total = 0
if k >= 1 and w <= 1000 and (n >= 0) and (n <= 1000000000):
	for i in range(w + 1):
		total = total + k * i
	n = total - n
	if n >= 0:
		print(n)
	else:
		print(0)


(k, n, w) = map(int, input().split())
ans = 0
for l in range(1, int(w) + 1):
	a = l * int(k)
	ans = ans + a
if ans - int(n) < 0:
	print(0)
else:
	print(ans - int(n))


(n, k, m) = [int(x) for x in input().split()]
s = (n + m * n) * m // 2
print(max(0, s - k))


try:
	(k, n, w) = input().split(' ')
	(k, n, w) = (int(k), int(n), int(w))
	if k >= 1 and w <= 1000 and (n >= 0) and (n <= 10 ** 9):
		tc = k * sum(list(range(1, w + 1)))
		if n >= tc:
			print(0)
		else:
			print(tc - n)
except:
	pass


a = input().split()
a[0] = int(a[0])
a[1] = int(a[1])
a[2] = int(a[2])
sum = 0
for i in range(1, a[2] + 1):
	sum = sum + i * a[0]
if a[1] >= sum:
	print('0')
else:
	print('%d' % (sum - a[1]))


def dollars_to_borrow(k, n, w):
	to_borrow = k * w * (w + 1) // 2 - n
	return to_borrow if to_borrow >= 0 else 0
(k, n, w) = map(int, input().split())
print(dollars_to_borrow(k, n, w))


def main():
	variables = input().split()
	print(borrowed_money(int(variables[0]), int(variables[1]), int(variables[2])))

def borrowed_money(cost, money, bananas):
	x = 0
	for i in range(1, bananas + 1):
		x += cost * i
	borrowed = money - x
	if borrowed >= 0:
		return 0
	else:
		return abs(borrowed)
main()


a = input().split()
x = int(a[0])
sm = 0
for i in range(1, int(a[2]) + 1):
	sm = sm + x
	x = (i + 1) * int(a[0])
n = int(a[1])
if sm > n:
	ans = sm - n
else:
	ans = 0
print(ans)


def banana(k, n, w):
	c = 0
	for i in range(1, w + 1):
		c += k * i
	if n >= c:
		return 0
	else:
		return c - n
(k, n, w) = map(int, input().split())
print(banana(k, n, w))


things = list(map(int, input().split()))
(pri, mon, ban) = (things[0], things[1], things[2])
total = 0
x = 0
while x != ban:
	x = x + 1
	total = total + pri * x
if mon - total >= 0:
	print(0)
else:
	print(abs(mon - total))


def banana(c, m, b):
	total = 0
	for i in range(1, b + 1):
		total += c * i
	if total < m:
		print(0)
	else:
		print(total - m)
(c, m, b) = map(int, input().split())
banana(c, m, b)


def balance(k, w, n, chislo=1, c=0):
	while w > 0:
		c += k * chislo
		w -= 1
		chislo += 1
	if c - n < 0:
		return 0
	else:
		return c - n
(k, n, w) = map(int, input().split())
print(balance(k, w, n))


entry = input()
x = entry.split(' ')
needed_money = (int(x[0]) + int(x[0]) * int(x[2])) * int(x[2]) / 2
if needed_money > int(x[1]):
	print(int(needed_money - int(x[1])))
else:
	print('0')


(v, b, n) = map(int, input().split())
print(max(v * n * (n + 1) // 2 - b, 0))


communism = input()
clist = communism.split(' ')
k = int(clist[0])
n = int(clist[1])
w = int(clist[2])
rigged_shop = []
for bannana in range(1, w + 1):
	rigged_shop.append(bannana * k)
capitalism = sum(rigged_shop)
difference = capitalism - n
if difference > 0:
	print(difference)
else:
	print(0)


s = [int(i) for i in input().strip().split()]
(k, n, w) = (s[0], s[1], s[2])
amt = k * (w * (w + 1)) / 2 - n
if amt < 0:
	print(0)
else:
	print(int(amt))


l = [int(x) for x in input().split()]
a = (x for x in range(l[2] + 1))
s = sum(a) * l[0]
if s > l[1]:
	print(s - l[1])
else:
	print('0')


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
cost = w * (w + 1) // 2 * k
if n > cost:
	print(0)
else:
	borrow = cost - n
	print(borrow)


s = input()
l = s.split()
des = int(l[1]) - int(l[0]) * (int(l[2]) * (int(l[2]) + 1)) / 2
if des < 0:
	print(int(-des))
else:
	print(0)


str_input = input()
param = str_input.split(' ')
b_cost = int(param[0])
cash = int(param[1])
wanted_b = int(param[2])
num = 0
for i in range(1, wanted_b + 1):
	n = i * b_cost
	num += n
if cash >= num:
	print(0)
else:
	print(num - cash)


(n, money, bananas) = input().split()
n = int(n)
bananas = int(bananas)
money = int(money)
cost = 0
for i in range(1, bananas + 1):
	cost += n * i
pay = cost - money
if pay > 0:
	print(pay)
else:
	print(0)


(k, n, w) = map(int, input().split())
s = w * (w + 1) * k / 2 - n
print(int((s + abs(s)) / 2))


def amtreq(k, n, w):
	amt = k * w * (w + 1) // 2
	if amt <= n:
		return 0
	return amt - n
(k, n, w) = tuple(map(int, input().split()))
print(amtreq(k, n, w))


(i, s, w) = map(int, input().split())
total = w * (w + 1) / 2 * i
b = total - s
if b <= 0:
	print('0')
else:
	print(int(b))


p = input()
word = p.split(' ')
a = [0, 1, 2]
count = 0
for i in word:
	a[count] = int(i)
	count += 1
w = a[2]
k = a[0]
n = a[1]
cost = int(w * (w + 1) / 2)
cost = cost * k
if cost < n:
	print('0')
else:
	print(cost - n)


list = input().split()
(k, n, w) = (int(list[0]), int(list[1]), int(list[2]))
print(max(int(k * w * (w + 1) / 2) - n, 0))


(first_banana, initial_money, n_of_bananas) = [int(x) for x in input().split()]
total_value = first_banana * (n_of_bananas * (n_of_bananas + 1) / 2)
print(int(total_value - initial_money) if total_value - initial_money > 0 else 0)


string = input().split()
need = (int(string[0]) + int(string[0]) * int(string[2])) / 2 * int(string[2])
answ = need - int(string[1])
if answ < 0:
	answ = 0
print(int(answ))


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
current_price = 0
for i in range(1, w + 1):
	current_price += i * k
if current_price > n:
	loan = current_price - n
else:
	loan = 0
print(loan)


a = list(map(int, input().strip().split()))[:3]
k = a[0]
n = a[1]
w = a[2]
num = int(w * (w + 1) * k / 2 - n)
if num > 0:
	print(num)
else:
	print('0')


list1 = input().split(' ')
k = int(list1[0])
n = int(list1[1])
w = int(list1[2])
answer = w * (w + 1) / 2 * k - n
if answer > 0:
	print(int(answer))
else:
	print(int(0))


(cost, money, num) = [int(x) for x in input().split()]
tc = 0
for i in range(num):
	tc += (i + 1) * cost
if tc <= money:
	print(0)
else:
	print(tc - money)


(a, m, k) = map(int, input().split())
total = a * k * (k + 1) // 2
if total - m > 0:
	print(total - m)
else:
	print(0)


a = input().split()
b = [int(x) for x in a]
k = b[0]
k1 = k
n = b[1]
w = b[2]
i = 2
count = 1
while count != w:
	k = k + k1 * i
	i += 1
	count += 1
if k >= n:
	print(k - n)
else:
	print('0')


def main():
	list1 = list(input().split())
	a = int(list1[0])
	b = int(list1[1])
	c = int(list1[2])
	all = 0
	k = 1
	for _ in range(c):
		all = a * k + all
		k += 1
	borr = all - b
	if borr < 0:
		borr = 0
	print(borr)
main()


nums = input().split(' ')
k = int(nums[0])
n = int(nums[1])
w = int(nums[2])
sum = w * (w + 1) / 2
k *= sum
ans = 0
if k > n:
	ans = k - n
print(int(ans))


(k, n, w) = map(int, input().split())
s = sum((i for i in range(1, w + 1))) * k
print([0, s - n][n < s])


(k, n, w) = [int(y) for y in input().split()]
cost = 0
for i in range(1, w + 1):
	cost += k * i
if cost > n:
	print(cost - n)
else:
	print(0)


a = input()
y = a.split(' ')
c = []
lol = 0
dig = 0
for i in y:
	c.append(int(i))
dig = c[2]
for i in range(1, dig + 1):
	lol += i * c[0]
if c[1] >= lol:
	print(0)
else:
	print(lol - c[1])


(k, n, w) = map(int, input().split())
total_amount_to_pay = 0
jj = 1
for i in range(w):
	total_amount_to_pay += k * jj
	jj += 1
if total_amount_to_pay > n:
	print(total_amount_to_pay - n)
else:
	print(0)


import math
(k, n, w) = map(int, input().split())
cost = w * (w + 1) / 2 * k
print(int(max(0, cost - n)))


import sys
numbers = [int(i) for i in sys.stdin.readline().split()]
k = numbers[0]
n = numbers[1]
w = numbers[2]
i = 1
total_price = 0
while i <= w:
	total_price += i * k
	i += 1
if n >= total_price:
	print('0')
else:
	print(total_price - n)


string = input().split()
k = int(string[0])
n = int(string[1])
w = int(string[2])
count = 0
for i in range(1, w + 1):
	count = count + k * i
if count - n > 0:
	print(count - n)
else:
	print(0)


ls = list(map(int, input().split()))
sum = 0
k = ls[0]
avilable = ls[1]
coun_banana = ls[2]
for i in range(1, coun_banana + 1):
	sum += k * i
p = sum - avilable
if p > 0:
	print(p)
else:
	print(0)


(k, n, w) = map(int, input().split())
s = 0
while w > 0:
	s = s + w
	w = w - 1
h = s * k
j = h - n
if j > 0:
	print(j)
else:
	print('0')


(k, n, w) = map(int, input().split())
p = int(0.5 * w * (w + 1) * k)
print(max(p - n, 0))


import os
import sys
t = sys.stdin.readline()
lines = []
while t:
	lines.append(t.split(' '))
	t = sys.stdin.readline()
for line in lines:
	k = int(line[0])
	n = int(line[1])
	w = int(line[2])
	suma = 0
	for i in range(1, w + 1):
		suma = suma + i * k
	result = suma - n
	if result > 0:
		print(result)
	else:
		print(0)


var = input()
(cost, money, banana) = var.split()
(cost, money, banana) = (int(cost), int(money), int(banana))
want = 0
for i in range(1, banana + 1):
	want += cost * i
borrow = want - money
if borrow > 0:
	print(borrow)
else:
	print(0)


(k, n, w) = map(int, input().split(' '))
p = 0
for i in range(w):
	a = i + 1
	p = p + a
p = p * k
q = p - n
if n > p:
	print(0)
	exit(0)
if q == 0:
	print(0)
	exit(0)
print(int(q))


data = [int(x) for x in input().split()]
an = data[0] + (data[2] - 1) * data[0]
sn = data[2] * (data[0] + an) / 2
print(int(sn - data[1]) if sn > data[1] else 0)


IP = input()
IP = IP.split(' ')
k = int(IP[0])
n = int(IP[1])
w = int(IP[2])
total_cost = 0
for i in range(w):
	total_cost += (i + 1) * k
if n >= total_cost:
	print(0)
else:
	print(total_cost - n)


s = input()
(k, n, w) = list(map(int, s.split()))
x = 0
for i in range(w + 1):
	x += k * i
result = int(x - n)
if n > x:
	print(0)
else:
	print(result)


(k1, n, w) = map(int, input().split())
f = 0
for i in range(1, w + 1):
	f += i
print(k1 * f - n if k1 * f - n > 0 else 0)


listans = [int(n) for n in input().split()]
(a, b, c) = (listans[0], listans[1], listans[2])
sum = 0
for i in range(1, c + 1):
	sum += a * i
if b >= sum:
	print(0)
	exit()
print(sum - b)


def func():
	a = input().split(' ')
	l1 = list(map(int, a))
	first = l1[0]
	money = l1[1]
	num = l1[-1]
	ans = int(first * num * (num + 1) / 2 - money)
	return ans if ans > 0 else 0
print(func())


(cost, mon, numB) = map(int, input().split(' '))
c = 0
for i in range(numB):
	c += cost * (i + 1)
print(max(0, c - mon))


def _546A(w, k, n):
	value = int(k * (w * (w + 1) / 2) - n)
	return value if value > 0 else 0
(k, n, w) = list(map(lambda x: int(x), input().split()))
print(_546A(w, k, n))


(k, n, w) = map(int, input().split())
szor = 1
sumb = 0
for e in range(w):
	sumb += szor * k
	szor += 1
need = sumb - n
if need < 0:
	print(0)
else:
	print(need)


(k, n, w) = list((int(a) for a in input().split()))
print(int(max(w * (w + 1) // 2 * k - n, 0)))


(C, M, n) = list(map(int, input().split()))
S = C * (1 + n) * n // 2
print(S - M if S > M else 0)


from sys import stdin, stdout

def trace(f):

	def traced(*args, **kw):
		print('calling {} with args {}, {}'.format(f.__name__, args, kw))
		return f(*args, **kw)
	return traced

@trace
def f(x):
	print(x)

def read():
	return stdin.readline()[:-1]

def readarr(sep=None, maxsplit=-1):
	return read().split(sep, maxsplit)

def readint():
	return int(read())

def readintarr(sep=None, maxsplit=-1):
	return [int(a) for a in readarr(sep, maxsplit)]

def write(*args, **kwargs):
	sep = kwargs.get('sep', ' ')
	end = kwargs.get('end', '\n')
	stdout.write(sep.join((str(a) for a in args)) + end)

def writearr(arr, sep=' ', end='\n'):
	stdout.write(sep.join((str(a) for a in arr)) + end)
(k, actual, bananas) = readintarr(' ')
costo = sum((i * k for i in range(1, bananas + 1)))
faltante = costo - actual
if faltante < 0:
	faltante = 0
write(faltante)


(cfb, mtsh, btb) = map(int, input().split())
tmtb = 0
for i in range(1, btb + 1):
	tmtb += i * cfb
if tmtb > mtsh:
	print(tmtb - mtsh)
else:
	print(0)


import sys
lines = sys.stdin.readlines()[0].strip()
data_list = lines.split(' ')
position = range(1, int(data_list[2]) + 1)
count = 0
for pos in position:
	count += int(data_list[0]) * pos
borrow = count - int(data_list[1])
if borrow >= 0:
	print(borrow)
else:
	print(0)


lst = list(map(int, input().strip().split(' ')))
ban_cost = lst[0]
he_mony = lst[1]
w = lst[2]
tot_cost = int(w * (w + 1) / 2 * ban_cost)
need = tot_cost - he_mony
if need > 0:
	print(need)
else:
	print(0)


(k, n, w) = input().split()
(k, n, w) = [int(k), int(n), int(w)]
total_money = 0
for i in range(1, w + 1):
	total_money += i * k
money_required = total_money - n
if money_required < 0:
	print('0')
else:
	print(money_required)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
cost = w * (w + 1) / 2
cost = cost * k
brow = cost - n
if brow < 0:
	brow = 0
print(int(brow))


(k, n, w) = [int(i) for i in input().split()]
multiplier = 1
value = 0
for i in range(w):
	value += k * multiplier
	multiplier += 1
if value > n:
	print(value - n)
else:
	print('0')


__author__ = 'myduomilia'
(k, n, w) = list(map(int, input().split()))
c = 0
ans = 0
while w > 0:
	w -= 1
	c += 1
	ans += k * c
print(ans - n if ans > n else 0)


x = input().split()
x = [int(i) for i in x]
price = x[0]
money = x[1]
number = x[2]
sum = 0
for i in range(1, number + 1):
	sum = sum + i * price
total = sum - money
if total >= 0:
	print(total)
else:
	print('0')


(k_dol_pag, n_del, w_banan) = input().split()

def preco(preco, quant):
	precofinal = 0
	for i in range(1, quant + 1):
		precofinal += preco * i
	return precofinal
preco_ = preco(int(k_dol_pag), int(w_banan))
finalresult = preco_ - int(n_del)
if finalresult < 0:
	finalresult = 0
print(finalresult)


(k, dollar, want) = map(int, input().split())
s = 0
for i in range(1, want + 1):
	s += k * i
if s <= dollar:
	print(0)
else:
	print(s - dollar)


symbols = input().split()
k = int(symbols[0])
n = int(symbols[1])
w = int(symbols[2])
need = 0
for i in range(w + 1):
	need += i * k
if need <= n:
	print(0)
else:
	print(need - n)


(k, n, w) = map(int, input().split())
s = 0
while w != 0:
	b = k * w
	s = s + b
	w = w - 1
q = s - n
if q < 0:
	print('0')
else:
	print(q)


(k, n, w) = map(int, input().split())
last = 0
for i in range(1, w + 1):
	m = k * i
	last += m
if n >= last:
	print(0)
else:
	print(abs(last - n))


(k, n, w) = str.split(input())
k = int(k)
n = int(n)
w = int(w)
fee = 0
for i in range(1, w + 1):
	fee = fee + i * k
t = fee - n
if t >= 0:
	print(t)
else:
	print('0')


from sys import stdin

def main():
	(k, n, w) = [int(x) for x in stdin.readline().split()]
	x = k
	for i in range(2, w + 1):
		x += i * k
	b = x - n
	if b < 1:
		print('0')
	else:
		print(b)
main()


l = input()
line = l.split(' ')
quality = int(line[0])
initial = int(line[1])
planned = int(line[2])
summary = quality * planned * (planned + 1) / 2
if initial < summary:
	print(int(summary - initial))
else:
	print(0)


from sys import stdin, stdout
from collections import Counter
from math import ceil
from bisect import bisect_left
from bisect import bisect_right
import math

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
(k, n, w) = ei()
s = 0
for i in range(1, w + 1):
	s += k * i
if s - n < 0:
	print(0)
else:
	print(s - n)


b = list(map(int, input().rstrip().split()))
k = b[0]
n = b[1]
w = b[2]
total = 0
for i in range(1, w + 1):
	total = total + i
total = total * k
if total <= n:
	print('0')
else:
	print(total - n)


(k, n, w) = map(int, input().split())
summ = 0
for j in range(0, w + 1):
	summ += j
z = summ * k - n
if z < 0:
	print(0)
else:
	print(z)


t = input().split(' ')
(k, n, w) = list(map(lambda x: int(x), t))
res = 0
for i in range(1, w + 1):
	res = res + i * k
borrow = n - res
if borrow >= 0:
	print(0)
else:
	print(abs(borrow))


(k, n, w) = [int(x) for x in input().strip().split()]
ans = w * k + w * (w - 1) * k // 2 - n
if ans >= 0:
	print(ans)
else:
	print(0)


m = [int(i) for i in input().split()]
bil = 0
k = m[0]
n = m[1]
w = m[2]
for i in range(w):
	bil += k * (i + 1)
if n >= bil:
	print(0)
else:
	otv = bil - n
	print(otv)


w = input().split()
k = int(w[0])
n = int(w[1])
ww = int(w[2])
cena = 0
for i in range(1, ww + 1):
	cena = cena + i * k
if cena > n:
	print(abs(cena - n))
else:
	print(0)


nums = [int(i) for i in input().split()]
dollars = nums[2] * (nums[2] + 1) // 2 * nums[0]
if nums[1] >= dollars:
	print('0')
else:
	print(dollars - nums[1])


(cost, money, amount) = list(map(int, input().split()))
borrow = cost * (amount * (amount + 1) / 2) - money
if borrow > 0:
	print(int(borrow))
else:
	print(0)


TN = 1

def solution():
	(k, n, w) = map(int, input().split())
	od = (k + w * k) * w // 2 - n
	if od > 0:
		print(od)
	else:
		print(0)
while TN != 0:
	solution()
	TN -= 1


(price, dol, am) = map(int, input().split())
index = 1
ali = 0
while am != 0:
	ali = ali + price * index
	index += 1
	am -= 1
if ali - dol > 0:
	print(ali - dol)
else:
	print(0)


def fd70000000():
	s = list(map(int, input().split()))
	w = s[2]
	n = s[1]
	k = s[0]
	haha = 0
	for i in range(1, w + 1):
		haha += i * k
	if n - haha < 0:
		return print(-1 * (n - haha))
	else:
		return print(0)
	return print('800*22.30')
fd70000000()


from math import gcd
(k, n, w) = [int(x) for x in input().split()]
value = k * sum([i for i in range(1, w + 1)])
total = value - n
if total > 0:
	print(total)
else:
	print(0)


n = list(map(int, input().split()))
sum = n[0] * (n[2] * (n[2] + 1) / 2)
borrow = sum - n[1]
if borrow < 0:
	print(0)
else:
	print(int(borrow))


x = input()
(k, n, w) = (int(x.split()[0]), int(x.split()[1]), int(x.split()[2]))
total = k * w * (w + 1) // 2
borrow = total - n
if borrow < 0:
	borrow = 0
print(borrow)


(i, t, b) = map(int, input().split())
c = 0
for j in range(1, b + 1):
	c = c + i * j
if c > t:
	need = c - t
elif c < t or c == t:
	need = 0
print(need)


def money():
	s = str(input())
	l = [int(i) for i in s.split()]
	t = l[2] / 2 * (l[0] + l[0] * l[2])
	t = int(t - l[1])
	if t > 0:
		print(t)
	else:
		print(0)
money()


(banana_cost, money, total_banana) = map(int, input().split())

def total_money_require(total_banana, banana_cost):
	return total_banana / 2 * (2 * banana_cost + (total_banana - 1) * (2 * banana_cost - banana_cost))

def result(total_banana, banana_cost):
	if total_money_require(total_banana, banana_cost) <= money:
		print('0')
	else:
		print(int(total_money_require(total_banana, banana_cost) - money))
result(total_banana, banana_cost)


t = [int(e) for e in input().split()]
sum = 0
for i in range(1, t[2] + 1):
	sum += i
if t[1] >= t[0] * sum:
	print(0)
else:
	print(t[0] * sum - t[1])


q = input()
w = q.split(' ')
e = []
r = 0
for i in w:
	e.append(int(i))
t = e[2]
for i in range(1, t + 1):
	r += i * e[0]
if e[1] >= r:
	print('0')
else:
	print(r - e[1])


from functools import reduce
(cost, dollars, num) = input().split()
(cost, dollars, num) = (int(cost), int(dollars), int(num))
costs = map(lambda i: cost * i, range(1, num + 1))
total_cost = reduce(lambda x, y: x + y, costs)
borrow = total_cost - dollars
print(borrow if borrow > 0 else 0)


(cost, current_money, wanted_bananas) = map(int, input().split())
current_cost = 0
for n in range(1, wanted_bananas + 1):
	current_cost += cost * n
if current_money > current_cost:
	print(0)
else:
	print(current_cost - current_money)


import sys

class Scanner:

	def __init__(self):
		self.current_tokens = []

	def remaining_tokens(self):
		return len(self.current_tokens)

	def nextline(self):
		assert self.remaining_tokens() == 0, 'Reading next line with remaining tokens'
		return input()

	def nexttokens(self):
		return self.nextline().split()

	def nexttoken(self):
		if len(self.current_tokens) == 0:
			self.current_tokens = self.nexttokens()
		assert self.remaining_tokens() > 0, 'Not enough tokens to parse.'
		return self.current_tokens.pop(0)

	def nextints(self, n=-1):
		if n == -1:
			return list(map(int, self.nexttokens()))
		else:
			return (self.nextint() for i in range(n))

	def nextint(self):
		return int(self.nexttoken())

def quit():
	sys.exit(0)
stdin = Scanner()
nextint = stdin.nextint
nextints = stdin.nextints
nextline = stdin.nextline
(k, n, w) = nextints(3)
c = 0
for i in range(w):
	c += (i + 1) * k
print(max(0, c - n))


lis = list(map(int, input().strip().split(' ')))
k = lis[0]
n = lis[1]
w = lis[2]
total = 0
for i in range(1, w + 1):
	total += i
price = k * total
borrow = price - n
if borrow < 0:
	print(0)
else:
	print(borrow)


(k, n, m) = list(map(int, input().split()))
kq = k * int((m + 1) * m / 2) - n
if kq < 0:
	kq = 0
print(kq)


c = [int(x) for x in input().split()]
j = 0
for k in range(c[2] + 1):
	j += k * c[0]
j = j - c[1]
if j > 0:
	print(j)
else:
	print(0)


(stoim, vrukah, kolvo) = map(int, input().split())
summa = 0
for i in range(1, kolvo + 1):
	summa = summa + i * stoim
if summa >= vrukah:
	print(summa - vrukah)
else:
	print('0')


(cost, my_m, bananas) = map(int, input().split(' '))
result = my_m
need_all = 0
for i in range(1, bananas + 1):
	need_all += i * cost
result -= need_all
if result < 0:
	print(abs(result))
else:
	print(0)


input_data = input()
list_we_use = input_data.split(' ')
t = []
f = 0
for i in list_we_use:
	t.append(int(i))
g = t[2]
for i in range(1, g + 1):
	f += i * t[0]
if t[1] >= f:
	print('0')
else:
	print(f - t[1])


def banana_price(price, quantity):
	total_price = 0
	for i in range(1, quantity + 1):
		total_price += i * price
	return total_price
(k, n, w) = input().split(' ')
amount = banana_price(int(k), int(w))
if int(n) >= amount:
	print(0)
else:
	print(amount - int(n))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy
from itertools import chain, dropwhile, permutations, combinations
from collections import defaultdict, deque

def VI():
	return list(map(int, input().split()))

def I():
	return int(input())

def LIST(n, m=None):
	return [0] * n if m is None else [[0] * m for i in range(n)]

def ELIST(n):
	return [[] for i in range(n)]

def MI(n=None, m=None):
	if n is None:
		(n, m) = VI()
	arr = LIST(n)
	for i in range(n):
		arr[i] = VI()
	return arr

def MS(n=None, m=None):
	if n is None:
		(n, m) = VI()
	arr = LIST(n)
	for i in range(n):
		arr[i] = input()
	return arr

def MIT(n=None, m=None):
	if n is None:
		(n, m) = VI()
	a = MI(n, m)
	arr = LIST(m, n)
	for (i, l) in enumerate(a):
		for (j, x) in enumerate(l):
			arr[j][i] = x
	return arr

def run(k, n, w):
	x = 0
	for i in range(1, w + 1):
		x += k * i
	if x <= n:
		print(0)
	else:
		print(x - n)

def main(info=0):
	(k, n, w) = VI()
	run(k, n, w)
main()


__author__ = 'artyom'

def main():
	(k, n, w) = read(3)
	t = 0
	for i in range(1, w + 1):
		t += i * k
	return max(0, t - n)

def read(mode=2):
	inputs = input().strip()
	if mode == 0:
		return inputs
	if mode == 1:
		return inputs.split()
	if mode == 2:
		return int(inputs)
	if mode == 3:
		return list(map(int, inputs.split()))

def write(s='\n'):
	if s is None:
		s = ''
	if isinstance(s, list):
		s = ' '.join(map(str, s))
	s = str(s)
	print(s, end='')
write(main())


(k, n, w) = map(int, input().split())
count = 1
a = b = 0
while count <= w:
	a = a + count * k
	count += 1
print(a - n) if a - n > 0 else print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
sum = 0
for a in range(1, w + 1):
	sum = sum + a * k
diff = sum - n
if diff > 0:
	print(diff)
else:
	print('0')


(k, n, w) = input().split()
price = 0
u = 0
i = 1
while i <= int(w):
	u = i * int(k)
	price = price + u
	i += 1
if price > int(n):
	print(price - int(n))
elif price < int(n) or price == int(n):
	print('0')


n = list(map(int, input().strip().split()))
s = 0
for i in range(1, n[2] + 1):
	s += i * n[0]
if s - n[1] >= 0:
	print(s - n[1])
else:
	print(0)


ipt = list(map(int, input().split()))
k = ipt[0]
dollars = ipt[1]
bananas = ipt[2]
total = 0
for i in range(1, bananas + 1):
	total += i * k
if total > dollars:
	print(total - dollars)
else:
	print(0)


(k, n, w) = [int(i) for i in input().split()]
i = 1
while i <= w:
	n = n - i * k
	i += 1
if n > 0:
	print(0)
else:
	print(-n)


(k, n, w) = map(int, input().split())
t = 0
money = 0
while t < w:
	money = money + k * (t + 1)
	t = t + 1
borrow = money - n
if borrow < 0:
	borrow = 0
print(borrow)


import math
(k, n, w) = map(int, input().split())
ans = w * k * (w + 1) / 2 - n
if ans < 0:
	print('0')
else:
	print(math.ceil(ans))


(k, n, w) = list(map(int, input().split()))
c = k * w * (w + 1) // 2
b = c - n
if b < 0:
	b = 0
print(b)


__author__ = 'Andrey'
(k, n, w) = map(int, input().split())
needed = w * (w + 1) // 2 * k
if needed <= n:
	print(0)
else:
	print(needed - n)


k = list(map(int, input().split(' ')))
if k[0] * (k[2] * (k[2] + 1) / 2) >= k[1]:
	print(int(k[0] * (k[2] * (k[2] + 1) * 0.5)) - k[1])
else:
	print('0')


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
totalCounter = 0
for i in range(w):
	totalCounter = totalCounter + i + 1
totalCost = totalCounter * k
answer = totalCost - n
if answer < 1:
	print('0')
else:
	print(answer)


__author__ = 'Utena'
(k, n, w) = map(int, input().split())
p = k * int(w * (1 + w) / 2)
if n >= p:
	print(0)
else:
	print(p - n)


a = input()
array = a.split()
k = int(array[0])
n = int(array[1])
w = int(array[2])
summ = 0
for i in range(w):
	summ += k * (i + 1)
if summ - n <= 0:
	print(0)
else:
	print(summ - n)


(k, n, w) = map(int, input().split())
result = 0
problem = 0
while problem < w:
	problem += 1
	result += k * problem
if result < n:
	print(0)
else:
	print(result - n)


(k, n, w) = map(int, input().split())
summa = 0
k1 = k
for i in range(w):
	summa += k1
	k1 += k
if summa > n:
	print(summa - n)
else:
	print(0)


list = [int(x) for x in input().split(' ')]
k = list[0]
w = list[1]
n = list[2]
count = 1
sum = 0
while count < n + 1:
	sum += count * k
	count += 1
if sum < w:
	print(0)
else:
	print(sum - w)


(banana_cost, money_in_wallet, bananas_needed) = [int(i) for i in input().split()]
cost = 0
for i in range(1, bananas_needed + 1):
	cost += banana_cost * i
if money_in_wallet < cost:
	print(cost - money_in_wallet)
else:
	print(0)


(k, n, w) = list(map(int, input().split()))
sum = w * (w + 1) / 2
ans = int(k * sum - n)
if ans < 0:
	print(0)
else:
	print(ans)


values = list((int(x) for x in input().split()))
k = values[0]
n = values[1]
w = values[2]
price = k * w * (w + 1) // 2
if price <= n:
	print(0)
else:
	print(price - n)


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
money = 0
x = 1
i = 0
while i != w:
	msh = x * k
	x = x + 1
	i = i + 1
	money = money + msh
n = n - money
if n < 0:
	print(-n)
else:
	print(0)


a = input().split()
a = [int(a[j]) for j in range(3)]
total = 0
for i in range(a[2]):
	total = total + a[0] * (i + 1)
if total - a[1] < 0:
	print(0)
else:
	print(total - a[1])


(a, b, c) = list(map(int, input().rstrip().split()))
k = 0
for i in range(1, c + 1):
	k = k + a * i
if b > k:
	print('0')
else:
	p = abs(k - b)
	print(p)


from sys import stdin, stdout
(k, n, w) = map(int, input().split())
l = k
r = w * k
ans = int((l + r) * w / 2)
if ans - n > 0:
	print(ans - n)
else:
	print(0)


(k, n, w) = map(int, input().split())
if k >= 1 and w <= 1000 and (0 <= n <= 10 ** 9):
	s = k * ((w + 1) * w * (1 / 2))
	if int(s - n) > 0:
		print(int(s - n))
	elif int(s - n) <= 0:
		print(int(0))


(f, g, h) = list(map(int, input().split(' ')))
s = 0
for i in range(1, h + 1):
	s += i * f
if g - s >= 0:
	print(0)
else:
	print(s - g)


n = list(map(int, input().strip().split(' ')))
a = int(n[1] - n[2] * (n[2] + 1) / 2 * n[0])
if a < 0:
	print(abs(a))
else:
	print(0)


l = list(map(int, input().split()))
t = l[0] * (l[2] * (l[2] + 1)) // 2
if t > l[1]:
	print(t - l[1])
else:
	print(0)


(k, n, w) = [int(i) for i in input().split()]
res = w * (w + 1) * k // 2 - n
print(res * (res > 0))


import sys
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def MI():
	return map(int, sys.stdin.readline().strip().split())

def LI():
	return list(map(int, sys.stdin.readline().strip().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().strip().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().strip().split()]

def LS():
	return sys.stdin.readline().strip().split()

def I():
	return int(sys.stdin.readline().strip())

def F():
	return float(sys.stdin.readline().strip())

def S():
	return sys.stdin.readline().strip()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	(k, n, w) = MI()
	p = k * (w * (w + 1) // 2)
	if p > n:
		print(p - n)
	else:
		print(0)
main()


inp = str(input())
vals = inp.split(' ')
cost = int(vals[0])
money_have = int(vals[1])
no_of_banana = int(vals[2])
total_cost = int(0)
initial_cost = cost
for n in range(no_of_banana):
	cost = initial_cost * (n + 1)
	total_cost = total_cost + cost
if int(total_cost - money_have) < 1:
	print('0')
else:
	print(int(total_cost - money_have))


abc = input().split(' ')
k = int(abc[0])
n = int(abc[1])
w = int(abc[2])
dollar = 0
for i in range(1, w + 1):
	dollar = dollar + i * k
if dollar > n:
	print(dollar - n)
else:
	print('0')


(k, n, w) = map(int, input().split())
cost = 0
for i in range(0, w + 1):
	rate = i * k
	cost = cost + rate
b = cost - n
if b <= 0:
	b = 0
print(b)


l = list(map(int, input().rstrip().split()))
cost = 0
for i in range(1, l[2] + 1):
	cost += i * l[0]
if cost > l[1]:
	print(cost - l[1])
else:
	print('0')


from sys import stdin

def main():
	(p, m, c) = list(map(int, stdin.readline().split()))
	func(p, m, c)

def func(p, m, c):
	t = int(c * (c + 1) / 2)
	r = t * p - m
	if r > 0:
		print(r)
	else:
		print(0)
main()


(k, n, w) = [int(x) for x in input().split()]
geom_sum = sum([i * k for i in range(1, w + 1)])
need = geom_sum - n
if need < 0:
	need = 0
print(need)


(price, moneyhave, banana_count) = map(int, input().split())
total_money_need = price * (banana_count + 1) * banana_count / 2
borrow_money = int(total_money_need - moneyhave)
if total_money_need > moneyhave:
	print(borrow_money)
else:
	print(0)


(a, b, c) = map(int, input().split())
z = 1
n = 0
while z <= c:
	n = n + a * z
	z = z + 1
if n <= b:
	print(0)
else:
	print(n - b)


l = list(map(int, input().split()))
(a, b, c) = l
k = c * (c + 1) / 2
k = a * k
if b < k:
	print(int(k - b))
else:
	print(0)


input_data = input()
list_we_use = input_data.split(' ')
g = []
p = 0
for i in list_we_use:
	g.append(int(i))
d = g[2]
for i in range(1, d + 1):
	p += i * g[0]
if g[1] >= p:
	print('0')
else:
	print(p - g[1])


data = input()
numbers = data.split()
unitcost = int(numbers[0])
initial = int(numbers[1])
nowanted = int(numbers[2])
count = 1
for x in range(nowanted):
	residual = initial - unitcost * count
	initial = residual
	count += 1
if initial < 0:
	print(initial * -1)
if initial >= 0:
	print('0')


(k, n, w) = map(int, input().split())
l = range(0, w + 1)
ans1 = k * sum(l)
ans = ans1 - n
if ans < 0:
	print(0)
else:
	print(ans)


(costOfFirstBanana, initialDollars, desire) = [int(ip) for ip in input().split(' ')]
deficit = int(desire * (desire + 1) * costOfFirstBanana / 2 - initialDollars)
if deficit > 0:
	print(deficit)
else:
	print(0)


i = input()
saisie = [int(x) for x in i.split(' ')]
(k, n, w) = (saisie[0], saisie[1], saisie[2])
cost = k * int(w * (w + 1) / 2)
if cost <= n:
	print('0')
else:
	print(str(cost - n))


def function(k, n, w):
	total = 0
	for i in range(1, w + 1):
		total += i * k
	if total <= n:
		return 0
	else:
		return total - n
n1 = list(map(int, input().rstrip().split()))
k = n1[0]
n = n1[1]
w = n1[2]
print(function(k, n, w))


num = input()
my_list = []
lst = []
my_list.append(num.split())
for i in my_list:
	new_list = i
k = int(new_list[0])
n = int(new_list[1])
w = int(new_list[2])
count = 0
for z in range(1, w + 1):
	count = k * int(z)
	lst.append(count)
x = sum(lst)
a = x - n
if a > 0:
	print(a)
else:
	print('0')


(k, n, w) = [int(s) for s in input().split()]
sub = n - k * (w ** 2 + w) // 2
print(-sub if sub < 0 else 0)


I = [int(i) for i in input().split()]
k = [int(i) for i in range(1, I[2] + 1)]
sum = 0
for i in k:
	sum += I[0] * i
if sum >= I[1]:
	print(sum - I[1])
else:
	print(0)


(k, n, w) = map(int, input().split())
money_all = 0
for i in range(1, w + 1):
	money_all = money_all + i * k
money_borrow = money_all - n
if money_borrow < 0:
	money_borrow = 0
print(money_borrow)


(k, n, w) = map(int, input().split())
c = 0
i = 1
while i <= w:
	c += k * i
	i += 1
j = n - c
if j > 0:
	print('0')
else:
	print(-j)


status = list(map(lambda x: int(x), input().split()))
(k, n, w) = status
cost = k * (w ** 2 + w) / 2
if cost > n:
	print(int(cost - n))
else:
	print(0)


three_integers = list(map(int, input().split()))
k = three_integers[0]
n = three_integers[1]
w = three_integers[2]
cost_of_all_bananas = 0
for c in range(1, w + 1):
	cost_of_all_bananas = cost_of_all_bananas + c * k
if cost_of_all_bananas > n:
	print(cost_of_all_bananas - n)
else:
	print(0)


temp = input().split(' ')
temp = list(map(int, temp))
k = temp[0]
pre = temp[1]
w = temp[2]
sum = 0
for x in range(1, w + 1):
	sum += x
res = k * sum - pre
if res > 0:
	print(res)
else:
	print('0')


def solve(k, m, w):
	j = k
	for i in range(1, w):
		j += (i + 1) * k
	return j - m if j - m > 0 else 0
(k, m, w) = map(int, input().split())
print(solve(k, m, w))


from sys import stdin
(k, n, w) = map(int, stdin.readline().split())
cost = k * (w * (w + 1) // 2)
if cost >= n:
	print(cost - n)
else:
	print(0)


(k, w, i) = input().split()
k = int(k)
i = int(i)
w = int(w)
print(int(max(i * (i + 1) / 2 * k - w, 0)))


x = input()
y = x.split()
(k, n, w) = (int(y[0]), int(y[1]), int(y[2]))
sum = (2 * k + k * (w - 1)) * w // 2
if sum - n > 0:
	print(sum - n)
else:
	print(0)


input = input().split(' ')
k = int(input[0])
n = int(input[1])
w = int(input[2])
z = []
for i in range(1, w + 1):
	z.append(i * k)
total = sum(z)
borrow = sum(z) - int(input[1])
if n > total:
	print(0)
else:
	print(borrow)


totprice = 0
(k, n, w) = map(int, input().split())
for i in range(1, w + 1):
	totprice += i * k
if totprice <= n:
	money = 0
else:
	money = totprice - n
print(int(money))


def go(k, n, w):
	cost = k * (w * (w + 1) // 2)
	return max(0, cost - n)
(k, n, w) = list(map(int, input().split(' ')))
print(go(k, n, w))


(k, n, w) = [int(i) for i in input().split()]
s = w * (w + 1) // 2 * k
c = s - n
if c > 0:
	print(c)
else:
	print('0')


x = input().split()
k = int(x[0])
n = int(x[1])
w = int(x[2])
y = sum(list(range(1, w + 1))) * k - n
if y < 0:
	y = 0
print(y)


texto = input('')
lista = texto.split(' ')
k = int(lista[0])
n = int(lista[1])
w = int(lista[2])
s = 0
for i in range(1, w + 1):
	t = i * k
	s = s + t
prestamo = s - n
if prestamo >= 0:
	print(prestamo)
else:
	print('0')


inp = input().split()
(k, n, w) = (int(inp[0]), int(inp[1]), int(inp[2]))
t = w * (w + 1) // 2 * k
if t - n > 0:
	print(t - n)
else:
	print(0)


from sys import stdin
k = list(map(int, stdin.readline().strip().split()))
precio = 0
for x in range(1, k[2] + 1):
	precio = precio + x * k[0]
if precio > k[1]:
	print(precio - k[1])
else:
	print(0)


(k, c, n) = map(int, input().split())
sm = n * (n + 1) // 2
sm = sm * k
if sm <= c:
	print(0)
else:
	print(abs(sm - c))


(a, b, c) = map(int, input().split())
d = 0
for i in range(1, c + 1):
	d += a * i
k = d - b
if k < 0:
	k = 0
print(k)


count = input().split()
s = 0
for i in range(int(count[2]) + 1):
	s += i * int(count[0])
if int(count[1]) < s:
	print(s - int(count[1]))
else:
	print(0)


x = input().split()
money = 0
k = int(x[0])
n = int(x[1])
w = int(x[2])
for i in range(w):
	money = money + k * (int(i) + 1)
deficit = money - n
if deficit >= 0:
	print(deficit)
else:
	print('0')


(k, n, w) = [int(i) for i in input().split()]
sum1 = 0
while w > 0:
	sum1 = sum1 + w
	w = w - 1
total_dollars = sum1 * k
diff = total_dollars - n
if diff > 0:
	print(diff)
else:
	print('0')


(k, n, w) = (int(x) for x in input().split())
i = 1
price = 0
while i <= w:
	perkiloprice = k * i
	price = perkiloprice + price
	i = i + 1
if price <= n:
	print('0')
else:
	print(price - n)


import sys
(k, n, w) = [int(x) for x in sys.stdin.readline().split(' ')]
ss = 0
for i in range(w):
	ss += k * (i + 1)
if ss - n > 0:
	print(ss - n)
else:
	print(0)


numbers = input()
numbers = numbers.split()
numbers = [int(i) for i in numbers]
print(max(0, numbers[0] * (numbers[2] + 1) * numbers[2] // 2 - numbers[1]))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
price = k
cost = 0
for i in range(w):
	cost += price
	price = k * (i + 2)
if cost > n:
	output = cost - n
	print(output)
else:
	print(0)


x = map(int, input().split())
(k, n, w) = x
l = w
count = 0
for i in range(w):
	count += l * k
	l = l - 1
balance = abs(count - n)
if n >= count:
	print(0)
else:
	print(balance)


s = input().split(' ')
s = list(map(int, s))
(a, b, c) = s
cont = 0
for x in range(1, c + 1):
	cont += x * a
res = cont - b
if res >= 0:
	print(res)
else:
	print(0)


from sys import stdin, stdout
(k, n, w) = map(int, stdin.readline().split())
total = 0
for i in range(1, w + 1):
	total += i * k
if total < n:
	print(0)
else:
	print(total - n)


(k, n, w) = input().split()
w = int(w)
result = 0
mylist = []
for i in range(1, w + 1):
	k = int(k)
	n = int(n)
	result = k * i
	mylist.append(result)
	d = sum(mylist)
if d > n:
	print(d - n)
else:
	print(0)


import sys
input = sys.stdin.readline()
while input:
	(k, n, w) = input.split()
	k = int(k)
	n = int(n)
	w = int(w)
	result = 0
	counter = 1
	while counter <= w:
		result += counter * k
		counter += 1
	if result - n <= 0:
		print(0)
	else:
		print(result - n)
	input = sys.stdin.readline()


x = input().split()
k = int(x[0])
n = int(x[1])
w = int(x[2])
i = 0
z = 0
hutang = 0
for i in range(w + 1):
	z += k * i
	i += 1
if z - n > 0:
	hutang = z - n
print(hutang)


def total(k, n, w):
	total = w * (w + 1) // 2
	total *= k
	if total > n:
		return total - n
	return 0
[k, n, w] = list(map(int, input().strip().split(' ')))
res = total(k, n, w)
print(res)


(b, m, n) = map(int, input().split())
lend = int(b * 0.5 * (n * (n + 1)) - m)
print(0) if lend <= 0 else print(lend)


import math
import collections
import bisect
import heapq
import time
import random
import itertools
import sys
(K, N, W) = map(int, input().split())
total = (K + K * W) * W // 2
print(max(0, total - N))


from sys import stdin
(k, n, w) = (int(x) for x in stdin.readline().strip().split(' '))
result = k * sum(range(1, w + 1)) - n
if result < 0:
	result = 0
print(result)


(k, n, w) = input().split()
total = 0
for i in range(1, int(w) + 1):
	total = total + int(k) * i
bor = total - int(n)
if bor <= 0:
	print(0)
else:
	print(bor)


(k, n, w) = (int(i) for i in input().split())
sum = divmod(k * (w + 1) * w, 2)[0]
if sum <= n:
	print(0)
else:
	print(sum - n)


(cost, amount, qu) = input().split()
i = 0
price = 0
while i <= int(qu):
	price += i * int(cost)
	i += 1
if price >= int(amount):
	print(price - int(amount))
else:
	print('0')


lst = input().split()
k = int(lst[0])
n = int(lst[1])
w = int(lst[2])
result = n
for i in range(1, w + 1):
	result -= i * k
if result > 0:
	print(0)
else:
	print(-result)


n = input().split()
k1 = n[0]
k2 = n[1]
k3 = n[2]
k = int(k1)
n = int(k2)
w = int(k3)
money = k * (1 + w) * w / 2
if money > n:
	print(int(money - n))
else:
	print(0)


(p1, ihave, iwant) = [int(i) for i in input().split()]
zongqianshu = 0
for i in range(1, iwant + 1):
	zongqianshu = zongqianshu + p1 * i
print(max(0, zongqianshu - ihave))


(cost_banana, money, count_banana) = map(int, input().split())
total_price = 0
for i in range(1, count_banana + 1):
	total_price += cost_banana * i
	i += 1
if money < total_price:
	debt = abs(money - total_price)
	print(debt)
else:
	print(0)


line = input()
params = line.split(' ')
k = int(params[0])
n = int(params[1])
w = int(params[2])
res = int(w * (w + 1) / 2 * k) - n
if res < 0:
	res = 0
print(res)


(k, n, w) = map(int, input().split())
if (1 <= k, w <= 1000 and 0 <= n <= 10 ** 9):
	sum_ = 0
	for i in range(w):
		sum_ += (i + 1) * k
	if sum_ > n:
		print(sum_ - n)
	else:
		print(0)


(k, w, n) = input().split()
k = int(k)
w = int(w)
n = int(n)
c = 1
cost = 0
b = 0
while c <= n:
	cost += c * k
	c += 1
if w < cost:
	b = cost - w
print(b)


(initial_price, owned_money, number_of_bananas) = map(int, input().split())
total_cost = 0
for i in range(1, number_of_bananas + 1):
	total_cost += i * initial_price
if total_cost > owned_money:
	print(total_cost - owned_money)
elif total_cost <= owned_money:
	print(0)


(k, n, w) = map(int, input().split())
o = (k + k * w) * w // 2
if n - o <= 0:
	print(abs(n - o))
else:
	print(0)


res = 0
xx = input()
(k, n, w) = xx.split()
k = int(k)
n = int(n)
w = int(w)
res = k * w * (w + 1) >> 1
if res > n:
	print(int(res - n))
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
money = 0
for i in range(w):
	money += (i + 1) * k
borrow = money - n
print([0, borrow][borrow > 0])


(k, n, w) = list(map(int, input().rstrip().split()))

def fun(a):
	d = a * (a + 1)
	d = d // 2
	return d
f = fun(w)
f = f * k
if f - n >= 0:
	print(f - n)
else:
	print(0)


pisang = input().split(' ')
x = int(pisang[2])
tot = 1
total = 0
for i in range(x):
	hasil = tot * int(pisang[0])
	tot += 1
	total += hasil
if total >= int(pisang[1]):
	hasill = total - int(pisang[1])
else:
	hasill = 0
print(hasill)


(k, n, w) = map(int, input().split())
m = 0
for i in range(1, 1 + w):
	m += i * k
print([m - n, 0][m < n])


def ValorPrestado(k, t, n):
	Monto = 0
	for j in range(1, n + 1):
		Monto += int(k) * j
	if t - Monto > 0:
		return 0
	else:
		return Monto - t
Cadena = input()
LC = Cadena.split()
k = int(LC[0])
t = int(LC[1])
n = int(LC[2])
Respuesta = ValorPrestado(k, t, n)
print(Respuesta)


x = input().split()
k = 1
sum = 0
c = int(x[2])
while k <= c:
	sum += k * int(x[0])
	k += 1
if sum < int(x[1]):
	print(0)
else:
	print(sum - int(x[1]))


import sys
inputs = sys.stdin.readline().split()
banana = 0
k = int(inputs[0])
n = int(inputs[1])
w = int(inputs[2])
for i in range(w):
	banana = banana + (i + 1)
dollar = banana * k
if n >= dollar:
	print(0)
else:
	print(dollar - n)


from math import ceil
(k, n, w) = list(map(int, input().split()))
if w == 0:
	print(0)
else:
	s = (2 * k + (w - 1) * k) / 2 * w
	if s < n:
		print(0)
	else:
		print(ceil(s - n))


a = [int(x) for x in input().split()]
borrow = a[0] * a[2] * (a[2] + 1) / 2 - a[1]
if borrow > 0:
	print(int(borrow))
else:
	print(0)


x = input()
y = x.split(' ')
a = []
cc = 0
ddd = 0
for i in y:
	a.append(int(i))
ddd = a[2]
for i in range(1, ddd + 1):
	cc += i * a[0]
if a[1] >= cc:
	print(0)
else:
	print(cc - a[1])


in1 = list(map(int, input().split()))
a = in1[0]
w = in1[1]
n = in1[2]
total = int(a * (n * (n + 1) / 2))
if total >= w:
	print(total - w)
else:
	print(0)


(k, n, w) = map(int, input().rstrip().split())
total = k * (w * (w + 1) // 2)
brr = total - n
if brr > 0:
	print(brr)
else:
	print(0)


ar = list(map(int, input().split()))
k = ar[0]
m = ar[1]
n = ar[2]
d = k * n * (n + 1) / 2
if d <= m:
	print(0)
else:
	print(int(d - m))


import math

def main():
	string = input()
	string = string.split(' ')
	k = int(string[0])
	n = int(string[1])
	w = int(string[2])
	price = sum(range(0, w + 1)) * k
	money = n - price
	if money >= 0:
		print('0')
	else:
		print(abs(money))
main()


data_k_n_w = input().split(' ')
data_k_n_w = [int(i) for i in data_k_n_w]
amount = int(data_k_n_w[0] * (data_k_n_w[2] * (data_k_n_w[2] + 1) / 2))
if amount < data_k_n_w[1]:
	print(0)
else:
	print(abs(amount - data_k_n_w[1]))


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
(k, n, w) = invr()
lagbe = 0
for i in range(0, w):
	lagbe += (i + 1) * k
ans = max(0, lagbe - n)
print(ans)


(k, n, w) = map(int, input().split())
total_cost = 0
for i in range(1, w + 1):
	total_cost += i * k
diff = total_cost - n
if n >= total_cost:
	print(0)
else:
	print(diff)


def getLines(num):
	inputLines = []
	for i in range(0, num):
		line = input()
		if line:
			inputLines.append(line)
		else:
			break
	return inputLines

def notZeroPow(num, p):
	return True if num >= 1 and num <= pow(10, p) else False

def countRepeat(value, arr):
	count = 0
	for e in arr:
		if e == value:
			count += 1
	return count
lines = getLines(1)
arr = [int(e) for e in lines[0].split()]
result = 0
for i in range(1, arr[2] + 1):
	result += arr[0] * i
result -= arr[1]
result = result if result > 0 else 0
print(result)


def total(n):
	ans = 0
	while n > 0:
		ans += n
		n -= 1
	return ans
a = list(map(int, input().split()))
ans = a[0] * total(a[2]) - a[1]
if ans < 0:
	print(0)
else:
	print(ans)


from sys import stdin
(primer_platano, dolares, platanos) = stdin.readline().strip().split()
primer_platano = int(primer_platano)
dolares = int(dolares)
platanos = int(platanos)
total_platanos = primer_platano * (platanos * (platanos + 1) / 2)
total = total_platanos - dolares
if total_platanos == dolares or total <= 0:
	print(0)
else:
	print(int(total))


(k, n, w) = map(int, input().split(' '))
answer = 0
for i in range(1, w + 1):
	answer += k * i
holder = answer - n
if holder <= 0:
	print(0)
else:
	print(holder)


(k, r, n) = map(int, input().split())
total = k * n * (n + 1) // 2
if total > r:
	print(total - r)
else:
	print(0)


k = list(map(lambda x: int(x), input().split()))
x = 0
for i in range(k[2] + 1):
	x += i
if k[0] * x >= k[1]:
	print(k[0] * x - k[1])
else:
	print('0')


(k, n, w) = (int(n) for n in input().split(' '))
p = int(k * w * (w + 1) / 2)
if n >= p:
	print(0)
else:
	print(p - n)


(k, n, w) = input().split(' ')
(k, n, w) = (int(k), int(n), int(w))

def calculator(k, w):
	res = 0
	for i in range(1, w + 1):
		res = k * i + res
	return res
r = calculator(k, w) - n
print(r) if r > 0 else print(0)


string = input()
a = string.split()
A = []
for i in a:
	A.append(int(i))
price = A[0]
bal = A[1]
num_ban = A[2]
n = 1
cost = 0
for i in range(num_ban):
	cost = cost + n * price
	n = n + 1
if cost <= bal:
	print(0)
else:
	print(cost - bal)


n = input().split(' ')
c = int(n[0])
Mn = int(n[1])
need = int(n[2])
t = 0
for k in range(need):
	t += (k + 1) * c
print(max(0, t - Mn))


(k, n, w) = map(int, input().split())
c = 0
for t in range(1, w + 1):
	c += k * t
if c - n > 0:
	print(c - n)
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
t = 0
d = k
for i in range(1, w + 1):
	t += k * i
print(max(0, t - n))


(k, n, w) = input().split(' ')
ans = 0
for i in range(1, int(w) + 1):
	ans += i * int(k)
if int(n) >= ans:
	print(0)
else:
	print(abs(int(n) - ans))


(k, n, w) = [int(i) for i in input().split()]
total = k * (w + 1) * w / 2
borrow = int(total - n)
if borrow > 0:
	print(borrow)
else:
	print(0)


import math
(unit_p, money, num) = list(map(int, input().split()))
total_p = unit_p * sum(range(1, num + 1))
if total_p > money:
	print(total_p - money)
else:
	print(0)


(x, y, z) = [int(j) for j in input().split()]
total_price = 0
for i in range(1, z + 1):
	price = x * i
	total_price += price
if total_price <= y:
	print('0')
else:
	borrow = total_price - y
	print(borrow)


(n, m, r) = map(int, list(input().split()))
x = int(1 / 2 * (1 + r) * r * n - m)
if x < 0:
	print(0)
else:
	print(x)


x = input().split()
(k, n, w) = list(map(int, x))
p = 0
for i in range(w):
	p += k * (i + 1)
b = n - p
if b < 0:
	print(abs(b))
else:
	print('0')


import sys
import queue

def FILE_IO():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(k, n, w) = map(int, input().split())
cost = w * (w + 1) / 2 * k
res = cost - n if cost > n else 0
print(int(res))


N = list(map(int, input().split()))
SUM = sum((i * N[0] for i in range(1, N[2] + 1)))
print(SUM - N[1] if SUM >= N[1] else 0)


import os
import math
import re
import sys
line = sys.stdin.readline()
while line:
	a = line.split()
	(k, n, w) = (int(a[0]), int(a[1]), int(a[2]))
	total_to_pay = w * (w + 1.0) / 2.0 * k
	print(max(0, int(total_to_pay - n)))
	line = sys.stdin.readline()


s = input()
ii = 0
fprob = sprob = 0
for l in s:
	if l == ' ' and fprob == 0:
		fprob = ii
	elif l == ' ' and sprob == 0:
		sprob = ii
	ii += 1
k = int(s[0:fprob])
n = int(s[fprob + 1:sprob])
w = int(s[sprob + 1:len(s)])
ii = 0
doll = 0
for i in range(1, w + 1):
	ii += 1
	if ii <= w:
		doll = doll + k * ii
if doll > n:
	print(doll - n)
else:
	print(0)


(c1, p, n) = map(int, input().split())
b = 0
for _ in range(1, n + 1):
	if _ * c1 <= p:
		p -= _ * c1
	else:
		b += _ * c1
print(0) if b == 0 else print(b - p)


x = input()
c = 0
cost = ''
money = ''
num = ''
sum = 0
while ord(x[c]) != 32:
	cost = cost + x[c]
	c += 1
c += 1
while ord(x[c]) != 32:
	money = money + x[c]
	c += 1
c += 1
while ord(x[c]) != 32:
	num = num + x[c]
	c += 1
	if c == len(x):
		break
n = int(num)
k = int(cost)
l = int(money)
while n != 0:
	sum = sum + k * n
	n = n - 1
if l >= sum:
	print(0)
else:
	print(sum - l)


(k, n, w) = map(int, input().split())
summ = w * (w + 1) // 2 * k - n
print((0, summ)[summ > 0])


import sys

def main():
	inp = sys.stdin.readlines()
	costs = int(inp[0].split(' ')[0])
	money = int(inp[0].split(' ')[1])
	wants = int(inp[0].split(' ')[2])
	to_pay = 0
	for banana in range(wants):
		to_pay = to_pay + costs * (banana + 1)
	to_borrow = money - to_pay
	if to_borrow > money or to_borrow > 0:
		print(0)
	else:
		print(abs(to_borrow))
main()


answer = input().split()
multiply = 2
new_arr = []
for item in answer:
	new_arr.append(int(item))
(b, i, a) = new_arr
for num in range(a - 1):
	b += multiply * new_arr[0]
	multiply += 1
a = i - b
if a > 0:
	print(0)
else:
	print(a + -2 * a)


input_data = input()
list_we_use = input_data.split(' ')
n = []
m = 0
for i in list_we_use:
	n.append(int(i))
l = n[2]
for i in range(1, l + 1):
	m += i * n[0]
if n[1] >= m:
	print('0')
else:
	print(m - n[1])


nums = input()
convertNums = []
for i in nums.split(' '):
	convertNums.append(int(i))
totalPrice = int(convertNums[0] * ((convertNums[2] ** 2 + convertNums[2]) / 2))
if convertNums[1] > totalPrice:
	print(0)
else:
	print(totalPrice - convertNums[1])


(k, n, w) = (int(i) for i in input().split())
k1 = w * (w + 1) // 2
c = k * k1
print(max(0, c - n))


import sys
temp = sys.stdin.readline()
while temp:
	(k, n, w) = temp.split(' ')
	k = int(k)
	n = int(n)
	w = int(w)
	aux = w * (w + 1) * k / 2
	if aux - n < 0:
		print(0)
	else:
		print(int(aux - n))
	temp = sys.stdin.readline()


num = [int(i) for i in input().split()]
res = int(num[0] * num[2] * (num[2] + 1) / 2 - num[1])
if res > 0:
	print(res)
else:
	print(0)


l = list(map(int, input().rstrip().split()))
k = l[0]
w = l[1]
n = l[2]
s = 0
for i in range(1, n + 1):
	x = i * k
	s = s + x
y = s - w
if y > 0:
	print(y)
else:
	print('0')


string = input()
n = len(string)
lis = []
result = 0
for i in range(n):
	if string[i] == ' ':
		lis.append(i)
for i in range(int(string[lis[1]:])):
	result = result + int(string[0:lis[0]]) * (i + 1)
k = int(string[lis[0] + 1:lis[1]]) - result
if k < 0:
	print(k * -1)
else:
	print(0)


import sys
from math import sqrt
inp = sys.stdin.readline
read = lambda : list(map(int, inp().split()))

def solve():
	(k, n, w) = read()
	print(w * (w + 1) // 2 * k - n if w * (w + 1) // 2 * k > n else 0)
solve()


data = list((int(i) for i in input().split()))
k = data[0]
n = data[1]
w = data[2]
pay = int(w * (w + 1) * k / 2)
if pay - n > 0:
	print(pay - n)
else:
	print('0')


a = input()
b = [int(i) for i in a.split() if i.isdigit()]
print(sum(b[0] * [i for i in range(1, b[2] + 1)]) - b[1] if b[1] < sum(b[0] * [i for i in range(1, b[2] + 1)]) else 0)


def solve():
	chars = str(input()).split()
	(k, n, w) = (int(chars[0]), int(chars[1]), int(chars[2]))
	tot = 0
	for x in range(1, w + 1):
		tot += k * x
	n -= tot
	if '-' in str(n):
		return int(''.join(str(n).split('-')))
	return 0
print(solve())


(initial, balance, num) = map(int, input().split())
cost = 0
for i in range(1, num + 1):
	cost = cost + i * initial
ans = cost - balance
if ans > 0:
	print(ans)
else:
	print(0)


mm = map(int, input().split())
(k, n, w) = mm
i = w * (w + 1) // 2
res = i * k - n
print(res if res >= 0 else 0)


import sys

def bill(k, w):
	ret = 0
	for i in range(1, w + 1):
		ret += i * k
	return ret
(k, n, w) = map(int, input().split())
print(max(0, bill(k, w) - n))


(k, n, w) = [int(i) for i in input().split()]
b = 0
for a in range(w + 1):
	if a <= w:
		b += a * k
if b <= n:
	print(0)
elif b > n:
	print(b - n)


ipt = input().split(' ')
f_price = int(ipt[0])
available_money = int(ipt[1])
banana = int(ipt[2])
total_money = 0
for i in range(1, banana + 1):
	total_money = total_money + i * f_price
borrow = 0
if available_money < total_money:
	borrow = total_money - available_money
print(borrow)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
x = 1
num = 0
y = 0
z = 0
while num != w:
	y = k * x
	z = z + y
	num += 1
	x += 1
if z > n:
	print(z - n)
else:
	print(0)


s = input().split()
l = []
for i in s:
	l.append(int(i))
require = l[0] * l[2] * (l[2] + 1)
final = require // 2
if l[1] >= final:
	print(0)
else:
	print(final - l[1])


set_input = [int(x) for x in input().split(' ')]
base_cost = set_input[0]
current_money = set_input[1]
bananas_required = set_input[2]
total_cost = 0
for x in range(1, bananas_required + 1):
	total_cost += base_cost * x
if total_cost > current_money:
	print(total_cost - current_money)
else:
	print('0')


bananalist = input().split()
k = int(bananalist[0])
n = int(bananalist[1])
w = int(bananalist[2])
need = int(w * k * (w + 1) / 2)
borrow = need - n
if borrow < 0:
	print('0')
else:
	print(str(borrow))


i = list(map(int, input().split()))
print(max(0, int(i[0] * ((i[2] + 1) * i[2]) / 2 - i[1])))


inps = input().split()
borrow = 0
for i in range(int(inps[2]), 0, -1):
	borrow += i * int(inps[0])
borrow = borrow - int(inps[1])
if borrow <= 0:
	print(0)
else:
	print(borrow)


(k, n, w) = map(int, input().split())
cnt = 0
c = 1
while c <= w:
	cnt += c * k
	c += 1
if cnt <= n:
	print('0')
else:
	print(cnt - n)


(cost, money, wanted) = map(int, input().split())
sums = int(wanted * cost * (wanted + 1) / 2)
print(max(sums - money, 0))


(k, n, w) = map(int, input().rstrip().split())
sum = 0
while w > 0:
	sum += w
	w -= 1
x = sum * k - n
if x > 0:
	print(x)
else:
	print(0)


inStr = input()
inLs = inStr.split()
k = int(inLs[0])
n = int(inLs[1])
w = int(inLs[2])
b = w * (w + 1) // 2 * k - n
if b < 0:
	b = 0
print(b)


(k, d, b) = map(int, input().split())
e = 0
for i in range(b + 1):
	f = k * i
	e = e + f
if d - e >= 0:
	print(0)
else:
	print(e - d)


def soldiersAndBananas(a, b, c):
	res = sum(list((i * a for i in range(1, c + 1))))
	return res - b if res > b else 0
(price, dollars, bananasreq) = map(int, input().split())
print(soldiersAndBananas(price, dollars, bananasreq))


try:
	(c, h, n) = map(int, input().split())
	s = h
	b = 0
	for i in range(1, n + 1):
		if s > 0:
			s = s - c * i
		else:
			b = b + c * i
	if s > 0:
		print(0)
	else:
		b = b + abs(s)
		print(b)
except:
	pass


lists = list(map(int, input().rstrip().split()))
for i in range(1, lists[2] + 1):
	lists[1] -= i * lists[0]
if lists[1] >= 0:
	print(0)
else:
	print(abs(lists[1]))


(k, n, w) = (int(v) for v in input().split())
ans = w * (w + 1) * k // 2 - n
if ans >= 0:
	print(ans)
else:
	print(0)


def solve():
	(k, n, w) = list(map(int, input().split()))
	sum = 0
	for i in range(1, w + 1):
		sum += i * k
	money_to_borrow = sum - n
	if money_to_borrow < 0:
		print('0')
	else:
		print(money_to_borrow)
solve()


def main():
	(k, n, w) = list(map(int, input().split()))
	b = (1 + w) * w * k // 2 - n
	if b > 0:
		print(b)
	else:
		print(0)
main()


(k, n, w) = list(map(int, input().split()))
value = w * (w + 1) * k // 2
if value <= n:
	print(0)
else:
	print(abs(value - n))


(k, n, w) = list(map(int, input().split()))
cost = 0
for i in range(1, w + 1):
	cost += i * k
if cost > n:
	borrow = abs(n - cost)
	print(borrow)
else:
	print('0')


from math import factorial
entrada = list((int(x) for x in input().split()))
var = 0
for i in range(entrada[2]):
	var += entrada[0] * (i + 1)
if var > entrada[1]:
	print(var - entrada[1])
else:
	print(0)


(w, d, n) = list(map(int, input().split()))
total = (w + n * w) / 2 * n
to_borrow = int(total) - d
print(to_borrow if to_borrow > 0 else 0)


from sys import stdin
(k, n, w) = map(int, stdin.readline().split())
total_cost = sum([k * j for j in range(1, w + 1)])
print(0 if n >= total_cost else total_cost - n)


(costPerBanana, initialMoney, wantBanana) = [int(x) for x in input().split()]
totalCost = wantBanana / 2 * ((wantBanana + 1) * costPerBanana)
needMoney = int(totalCost - initialMoney)
if needMoney <= 0:
	needMoney = 0
print(needMoney)


entrada = input().split()
k = int(entrada[0])
n = int(entrada[1])
w = int(entrada[2])
coste = 0
for i in range(1, w + 1):
	coste = coste + i * k
if n - coste < 0:
	print(abs(n - coste))
else:
	print(0)


k = input()
e = k.split(' ')
h = []
c = 0
for i in e:
	h.append(int(i))
b = h[2]
for i in range(1, b + 1):
	c += i * h[0]
if h[1] >= c:
	print('0')
else:
	print(c - h[1])


(k, n, w) = map(int, input().split())
formula = w * (k + k * w) // 2
cal = n - formula
if cal < 0:
	print(abs(cal))
else:
	print(0)


(k, n, w) = map(int, input().split())
z = 0
p = []
for i in range(w):
	z = z + 1
	g = z * k
	p = p + [g]
p = sum(p)
if p - n <= 0:
	print(0)
elif p - n > 0:
	o = p - n
	print(o)


price = input().split(' ')
pricee = int(price[0])
money = int(price[1])
banana = int(price[2])
arith = banana
hold = 0
while arith >= 0:
	hold = hold + arith * pricee
	arith = arith - 1
	if arith == 0:
		continue
rem = hold - money
if rem > 0:
	print(rem)
else:
	print('0')


input_data = input()
list_we_use = input_data.split(' ')
p = []
n = 0
for i in list_we_use:
	p.append(int(i))
e = p[2]
for i in range(1, e + 1):
	n += i * p[0]
if p[1] >= n:
	print('0')
else:
	print(n - p[1])


(k, n, w) = map(int, input().split())
need = w * (1 + w) // 2 * k
print([0, need - n][need > n])


str1 = input()
str1 = list(str1.split(' '))
a = int(str1[0])
x = int(str1[1])
n = int(str1[2])
sum1 = 0
for i in range(1, n + 1):
	sum1 += a * i
if sum1 > x:
	print(sum1 - x)
else:
	print(0)


(cost, dollers, n) = map(int, input().split())
numberOfBananas = n * (n + 1) / 2
totalMoney = cost * numberOfBananas
diff = totalMoney - dollers
if diff <= 0:
	print(0)
else:
	print(int(diff))


q = input()
w = q.split(' ')
k = []
d = 0
b = 0
for i in w:
	k.append(int(i))
b = k[2]
for i in range(1, b + 1):
	d += i * k[0]
if k[1] >= d:
	print(0)
else:
	print(d - k[1])


banana = input()
ban = [int(x) for x in banana.split(' ')]
cost = ban[0] * sum([z for z in range(ban[2] + 1)])
if cost - ban[1] < 0:
	print(0)
else:
	print(cost - ban[1])


a = [int(x) for x in input().split()]
first_price = a[0]
dollars = a[1]
bananas = a[2]
for x in range(bananas):
	dollars = dollars - (x + 1) * first_price
if dollars < 0:
	print(abs(dollars))
else:
	print(0)


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
s = w * (w + 1) / 2 * k
res = n - s
if res > 0:
	print(0)
else:
	print(int(abs(res)))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
x = (sum(range(w)) + w) * k
if x > n:
	print(x - n)
else:
	print(0)


n = input().split()
answ = int((1 + int(n[2])) * int(n[2]) / 2 * int(n[0]) - int(n[1]))
print(answ if answ > 0 else 0)


str_0 = input()
list_0 = str_0.split()
k = int(list_0[0])
n = int(list_0[1])
w = int(list_0[2])
w_0 = 0
for i in range(w):
	w_0 += i + 1
if w_0 * k - n >= 0:
	print(w_0 * k - n)
else:
	print(0)


(fp, hm, n) = map(int, input().split())
v = fp
for i in range(n):
	hm -= v
	v += fp
if hm < 0:
	print(hm * -1)
else:
	print('0')


n = input()
k = 1
total = 0
(cost, ini, want) = n.split()
for i in range(int(want)):
	total += k * int(cost)
	k += 1
borrow = total - int(ini)
if borrow <= 0:
	print('0')
else:
	print(borrow)


def price(k, w):
	return k * w * (w + 1) // 2

def output(x, n):
	return 0 if x - n < 0 else x - n
(k, n, w) = map(int, input().split())
print(output(price(k, w), n))


import sys
(k, n, w) = map(int, sys.stdin.readline().split())
total = k * w * (w + 1) // 2
if n >= total:
	print(0)
else:
	print(total - n)


nos = input().split(' ')
(k, n, w) = [int(x) for x in nos]
cost = 0

def each_banana_cost(k, w):
	for i in range(w):
		yield (k * (i + 1))
for x in each_banana_cost(k, w):
	cost += x
print(cost - n if cost > n else 0)


(a, m, n) = map(int, input().split())
print(max(0, a * (n * (n + 1)) // 2 - m))


(k, n, w) = map(int, input().split())
ans = (k + w * k) * w // 2
print(max(0, ans - n))


(start_price, dollars, banana_count) = map(int, input().split())
need_money = start_price * (banana_count + 1) * banana_count / 2
if need_money <= dollars:
	print(0)
else:
	print(int(need_money - dollars))


input_var = [int(x) for x in input().split(' ')]
cost_of_banana = input_var[0]
number_of_dollars = input_var[1]
bananas_want = input_var[2]
total_cost = int(bananas_want * (bananas_want + 1) / 2)
borrow = total_cost * cost_of_banana - number_of_dollars
if borrow < 0:
	print(0)
else:
	print(borrow)


arr = str(input()).split()
(op, mon, count) = (int(arr[0]), int(arr[1]), int(arr[2]))
sum = op * count * (count + 1) / 2
if mon - sum < 0:
	print(str(abs(mon - sum))[:-2])
else:
	print(0)


a = list(input().split())
k = int(a[0])
n = int(a[1])
w = int(a[2])

def cost(a, b):
	sum1 = 0
	for i in range(a):
		sum1 = sum1 + (i + 1) * b
	return sum1
sum = cost(w, k)
s = sum - n
if s > 0:
	print(s)
else:
	print(0)


(price, wallet, q) = input().split()
price = int(price)
q = int(q)
wallet = int(wallet)
receipt = 0
for i in range(q):
	receipt += price + price * i
if receipt > wallet:
	print(receipt - wallet)
else:
	print(0)


condition = [int(x) for x in input().split()]
sum = 0
for i in range(1, condition[2] + 1):
	price = i * condition[0]
	sum += price
needtoborrow = sum - condition[1]
if needtoborrow <= 0:
	print(0)
else:
	print(needtoborrow)


import sys
import math
(k, n, w) = map(int, input().split())
dollars = 0
for i in range(w + 1):
	dollars += i * k
ans = dollars - n
if ans >= 0:
	print(ans)
else:
	print(0)


(k, n, w) = map(int, input().split())
costs = 0
for i in range(1, w + 1):
	costs = costs + i * k
borrowed = costs - n
if borrowed < 0:
	borrowed = 0
print(borrowed)


inSuff = list(map(int, input().split()))
totalCost = inSuff[0] * inSuff[2] * (inSuff[2] + 1) // 2
if totalCost <= inSuff[1]:
	print(0)
else:
	print(totalCost - inSuff[1])


(k, n, w) = map(int, input().split())
money_required = 0
for i in range(1, w + 1):
	money_required += k * i
borrowed = money_required - n
if borrowed > 0:
	print(borrowed)
else:
	print(0)


(cost, dollor, banana) = list(map(int, input().split()))
sumOfNBanana = banana * (banana + 1) // 2
print('0') if dollor >= cost * sumOfNBanana else print(abs(dollor - cost * sumOfNBanana))


poop = input().split()
if int(poop[0]) * (int(poop[2]) * (int(poop[2]) + 1)) / 2 > int(poop[1]):
	print(int(int(poop[0]) * (int(poop[2]) * (int(poop[2]) + 1)) / 2 - int(poop[1])))
else:
	print(0)


(k, n, w) = [int(__) for __ in input().strip().split()]
req = w * (w + 1) // 2
req *= k
if req - n <= 0:
	print(0)
else:
	print(req - n)


str = input()
a = int(str.split()[0])
b = int(str.split()[1])
c = int(str.split()[2])
l = list(range(1, c + 1))
t = sum(l) * a - b
if t < 0:
	t = 0
print(t)


(a, b, c) = map(int, input().split())
tot = c * (1 + c) / 2 * a
print(int(tot - b), '\n') if tot - b > 0 else print('0\n')


(k, n, w) = map(int, input().split())
w1 = k
for i in range(2, w + 1):
	w1 += k * i
if w1 - n <= 0:
	print(0)
else:
	print(w1 - n)


(a, b, c) = map(int, input().split())
sum1 = 0
for i in range(1, c + 1):
	sum1 += i * a
r = b - sum1
if r > 0:
	print(0)
else:
	print(abs(r))


(x, y, z) = input().split()
moneyRequired = int(z) * (int(z) + 1) * int(x) / 2
print(abs(int(int(y) - moneyRequired)) if moneyRequired > int(y) else 0)


a = input()
b = a.split()
k = b[0]
n = b[1]
w = b[2]
x = int(k)
y = int(n)
z = int(w)
rangeZ = list(range(1, z + 1))
rangeZmultiplied = [i * x for i in rangeZ]
bananaCost = sum(rangeZmultiplied)
if y > bananaCost:
	print(0)
else:
	print(bananaCost - y)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
summ = 0
for i in range(1, w + 1):
	summ = summ + i * k
if summ > n:
	zaym = summ - n
	print(zaym)
else:
	print(0)


x = input().split()
z = 0
for i in range(int(x[2])):
	z += (i + 1) * int(x[0])
print(max(0, z - int(x[1])))


(k, n, w) = [int(x) for x in input().split()]
(s, b) = (0, 0)
for i in range(1, w + 1):
	s = s + i
b = s * k - n
if b > 0:
	print(b)
elif b <= 0:
	print('0')


class solution:

	def __init__(self):
		self.list1 = []
		self.rem = 0
		self.w = 0
		self.k = 0
		self.n = 0

	def compute(self):
		sum1 = self.w * (self.w + 1) / 2
		amount = self.k * sum1
		self.rem = amount - self.n

	def change(self):
		self.k = int(self.list1[0])
		self.n = int(self.list1[1])
		self.w = int(self.list1[2])

	def get_input(self):
		str1 = input()
		temp = str1.split()
		self.list1 = temp
		del temp

	def check(self):
		if self.rem <= 0:
			self.rem = 0

	def show(self):
		print(int(self.rem))

	def execute(self):
		self.get_input()
		self.change()
		self.compute()
		self.check()
		self.show()

def main():
	s1 = solution()
	s1.execute()
main()


a = list(map(int, input().split()))
(k, s, i) = (1, 0, 0)
while i != a[2]:
	s = s + a[0] * k
	k = k + 1
	i = i + 1
if s <= a[1]:
	print(0)
else:
	print(s - a[1])


inp = input().split()
for i in range(0, len(inp)):
	inp[i] = int(inp[i])
ans = inp[2] * (inp[2] + 1) * inp[0] // 2 - inp[1]
if ans < 0:
	ans = 0
print(ans)


A = input().split()
for i in range(3):
	A[i] = int(A[i])
b = 0
for i in range(1, A[2] + 1):
	b += i
c = b * A[0] - A[1]
if c < 0:
	print(0)
else:
	print(c)


A = input()
B = []
for i in A.split():
	B.append(int(i))
if (B[0] + B[2] * B[0]) * B[2] / 2 > B[1]:
	sum = (B[0] + B[2] * B[0]) * B[2] / 2 - B[1]
else:
	sum = 0
print(int(sum))


(k, n, m) = map(int, input().split(' '))
sums = 0
for i in range(m + 1):
	sums += i
counts = sums * k
ks = counts - n
if ks > 0:
	print(ks)
else:
	print('0')


(p, q, w) = map(int, input().split())
s = 0
for i in range(w):
	s = s + (i + 1) * p
if s - q < 0:
	print(0)
else:
	print(s - q)


array = []
(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)

def banana_price(k, w):
	price = 0
	for i in range(1, w + 1):
		price += k * i
	return price
price = banana_price(k, w)
sold_dev = n - price
if sold_dev < 0:
	sold_dev = abs(sold_dev)
else:
	sold_dev = 0
print(sold_dev)


(k, n, w) = input().split()
(k, n, w) = [int(k), int(n), int(w)]
moneyConsumed = 0
for iterator in range(w):
	moneyConsumed = moneyConsumed + (iterator + 1) * k
moneyToBorrow = n - moneyConsumed
if moneyToBorrow < 0:
	print(abs(moneyToBorrow))
else:
	print(0)


lst = list(map(int, input().split()))
(k, n, w) = (lst[0], lst[1], lst[2])
count = 0
yo = 1
bought = 0
while bought < w:
	count += yo * k
	bought += 1
	yo += 1
if n > count:
	print(0)
else:
	print(count - n)


n = list(map(int, input().split()))
kali = 0
hasil = []
array = []
array.append(n)
w = array[0][2]
k = array[0][0]
n = array[0][1]
for i in range(w):
	kali = (i + 1) * k
	hasil.append(kali)
jawab = sum(hasil) - n
if jawab > 0:
	print(jawab)
else:
	print(0)


def sum(n):
	if n % 2 == 0:
		return int((n + 1) * (n / 2))
	else:
		return int((n + 1) * (n / 2.0))

def main():
	from sys import stdout
	(k, n, w) = map(int, input().split())
	price = sum(w)
	money = price * k
	if money >= n:
		res = money - n
	else:
		res = 0
	stdout.write(str(res))
main()


a = list(map(int, input().split()))
a1 = a[0]
a2 = a[1]
a3 = a[2]
b = round(a3 * (a3 + 1) // 2) * a1 - a2
if b > 0:
	print(b)
else:
	print(0)


a = [int(j) for j in input().split()]
b = int(a[2] * (a[2] + 1) * a[0] / 2)
if a[1] >= b:
	print(0)
else:
	print(b - a[1])


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
final = -n
for j in range(w):
	final += (j + 1) * k
if final <= 0:
	print(0)
else:
	print(final)


(price, have, total) = [int(price) for price in input().split()]
new_price = 0
for i in range(1, total + 1):
	new_price = new_price + i
borrow = new_price * price - have
if 0 < borrow:
	print(borrow)
else:
	print(0)


a = input()
a = a.split(' ')
k = a[0]
n = a[1]
w = a[2]
x = 0
i = 1
for i in range(int(w) + 1):
	x += int(k) * i
if x <= int(n):
	print(0)
elif x > int(n):
	print(x - int(n))


(k, n, w) = map(int, input().split())
count = 0
for i in range(w + 1):
	count = count + k * i
r = count - n
if r > 0:
	print(r)
if r <= 0:
	print(0)


a = input().split()
a[0:] = [int(zahl) for zahl in a[0:]]
b = 0
c = a[1]
d = int
for i in range(1, a[2] + 1):
	d = i * a[0]
	b = b + d
if b - c > 0:
	print(b - c)
else:
	print(0)


def amount_borrow(k, n, w):
	amount_needed = k * w * (w + 1) / 2
	if amount_needed <= n:
		print(0)
		return
	else:
		print(int(amount_needed - n))
		return

def read_line():
	(k, n, w) = input().split()
	return (int(k), int(n), int(w))
(k, n, w) = read_line()
amount_borrow(k, n, w)


(initial, money, to_buy) = list(map(int, input().split(' ')))
sum = 0
total = 0
for i in range(1, to_buy + 1):
	to_pay = initial * i
	if to_pay > money:
		sum += to_pay - money
		money -= money
	else:
		rem = money - to_pay
		money = rem
print(sum)


given = list(map(int, input().split()))
k = given[0]
n = given[1]
w = given[2]
total = k * w * (w + 1) * 0.5
if total > n:
	print(int(total) - n)
else:
	print(0)


INPUT_VALUE = str(input()).split(' ')
ALL_DOLLARS = 0
FIRST_DOLLARS = int(INPUT_VALUE[0])
for i in range(0, int(INPUT_VALUE[2])):
	ALL_DOLLARS += FIRST_DOLLARS * (i + 1)
BORROW_DOLLARS = int(INPUT_VALUE[1]) - ALL_DOLLARS
if BORROW_DOLLARS < 0:
	print(abs(BORROW_DOLLARS))
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
amount = 0
for i in range(1, w + 1):
	amount += k * i
if amount <= n:
	print('0')
elif amount > n:
	borrow = amount - n
	print(borrow)


def main():
	(k, n, w) = list(map(int, input().split()))
	money_total = 0
	for i in range(w):
		money = k * (i + 1)
		money_total += money
	if money_total < n:
		print(0)
	else:
		print(money_total - n)
main()


(k, n, w) = [int(i) for i in input().split()]
total_cost = 0
for i in range(1, w + 1):
	total_cost = total_cost + k * i
borrow = total_cost - n
if borrow > 0:
	print(borrow)
else:
	print('0')


N = [int(x) for x in input().split()]
price = N[0]
asset = N[1]
number = N[2]
total = number * (number + 1) * price / 2
borrow = max(0, total - asset)
print(int(borrow))


T = list(map(int, input().split(' ')))
k = T[0]
n = T[1]
w = T[2]
A = w * (w + 1) / 2
PA = A * k
res = PA - n
if res <= 0:
	print('0')
else:
	print(round(PA - n))


(k, n, w) = map(int, input().split(' '))
total_cost = (k + w * k) / 2 * w
print(max(0, int(total_cost - n)))


x = [int(y) for y in input().split(' ')]
r = x[2] * (x[2] + 1) // 2 * x[0]
r = r - x[1]
if r < 0:
	r = 0
print(r)


l = list(map(int, input().split()))
c = 1
N = 0
while c <= l[2]:
	N = N + l[0] * c
	c += 1
if N >= l[1]:
	print(N - l[1])
else:
	print(0)


(a, b, c) = map(int, input().split())
d = 0
i = 1
q = 0
while d != c:
	q += a * i
	i += 1
	d += 1
if q - b < 0:
	print(0)
else:
	print(q - b)


(cost, money, n) = map(int, input().split())
n = n * (n + 1) // 2
mr = cost * n
if mr > money:
	print(mr - money)
else:
	print('0')


(k, n, w) = list(map(int, input().split()))
temp = []
for i in range(w):
	res = k * (i + 1)
	temp.append(res)
hasil = sum(temp)
if hasil == n or hasil < n:
	print(0)
else:
	print(hasil - n)


(c, m, v) = map(int, input().split())
print(max(0, v * (v + 1) * c // 2 - m))


(k, n, w) = input().split(' ')
(k, n, w) = (int(k), int(n), int(w))
dollars = 0
for count in range(w + 1):
	dollars += count * k
if n > dollars:
	print(0)
else:
	print(dollars - n)


def NVer(k, n, w):
	s = 0
	for i in range(1, w + 1):
		s += k * i
	if s <= n:
		return 0
	return s - n
(k, n, w) = map(int, input().split())
print(NVer(k, n, w))


knw = tuple(map(int, input().split()))
mx = 0
mr = knw[1]
for i in range(1, knw[2] + 1):
	mx = knw[0] * i
	mr -= mx
if mr < 0:
	print(abs(mr))
else:
	print(0)


(Cost, Initial, Wants) = list(map(int, input().split()))
Total = Wants * (Wants + 1) / 2 * Cost
if Initial > Total:
	print(0)
else:
	print(int(Total) - Initial)


a = input()
a = a.split()
b = int((int(a[2]) + 1) * int(a[2]) * int(a[0]) / 2 - int(a[1]))
if b > 0:
	print(b)
elif b <= 0:
	print('0')


n = input()
s = n.split()
a = int(s[0])
b = int(s[1])
c = int(s[2])
t = []
for i in range(1, c + 1):
	t.append(a * i)
d = sum(t)
if b >= d:
	print(0)
else:
	print(d - b)


(p, n, r) = map(int, input().split())
s = 0
for i in range(1, r + 1):
	s += i * p
x = s - n
if x >= 0:
	print(x)
else:
	print(0)


def getAmount():
	inputStr = [int(x) for x in input().split(' ')]
	firstAmt = inputStr[0]
	initialAmt = inputStr[1]
	numOfBananas = inputStr[2]
	totalPrice = firstAmt
	for i in range(2, numOfBananas + 1):
		totalPrice += firstAmt * i
	if totalPrice > initialAmt:
		return totalPrice - initialAmt
	else:
		return 0
print(getAmount())


(k, n, w) = input().split()
a = 0
for i in range(1, int(w) + 1):
	g = i * int(k)
	a = g + a
ans = a - int(n)
if ans > 0:
	print(ans)
else:
	print('0')


import functools
(k, n, w) = tuple(map(int, input().split()))
total = functools.reduce(lambda x, y: x + y * k, range(w + 1))
loan = total - n
print(loan if loan > 0 else 0)


a = [int(s) for s in input().split()]
c = 1
r = 0
k = a[0]
n = a[1]
w = a[2]
for i in range(w):
	r = r + k * c
	c = c + 1
x = r - n
if x > 0:
	print(x)
else:
	print(0)


arr = input()
l = list(map(int, arr.split(' ')))
k = int(l[0])
n = int(l[1])
w = int(l[2])
w = w * (w + 1) / 2
if int(w * k - n) < 0:
	result = 0
else:
	result = int(w * k - n)
print(result)


inputValues = list(map(int, input().split()))
costOfTheFirstBanana = inputValues[0]
numberOfDollars = inputValues[1]
numberOfBananas = inputValues[2]
bananasCost = numberOfBananas / 2 * (2 + numberOfBananas - 1) * costOfTheFirstBanana
soldierDebt = int(bananasCost) - numberOfDollars
if soldierDebt < 0:
	soldierDebt = 0
print(soldierDebt)


(cost, dol, no) = map(int, input().split())
sum = 0
for i in range(no + 1):
	sum += cost * i
if dol > sum:
	print('0')
else:
	print(sum - dol)


(k, n, w) = list(map(int, input().rstrip().split()))
c = 0
for i in range(1, w + 1):
	c = c + k * i
if n > c:
	print('0')
else:
	d = abs(c - n)
	print(d)


(dollar, monry, number) = map(int, input().split())
needmoney = number * dollar + number * (number - 1) / 2 * dollar
if needmoney > monry:
	print(int(needmoney - monry))
else:
	print(0)


def get_sum(n):
	if n == 1:
		return 1
	else:
		return n + get_sum(n - 1)
(k, n, w) = [int(x) for x in input().split()]
total = get_sum(w) * k
if total > n:
	print(total - n)
else:
	print('0')


d = 0
(a, b, c) = map(int, input().split())
import functools
d = (lambda k: functools.reduce(int.__add__, range(2, k + 1), 1))(c)
if d * a - b > 0:
	print(d * a - b)
else:
	print(0)


(k, n, w) = map(int, input().split())
m = w
a = k
d = k
sum = m / 2 * (2 * a + (m - 1) * d)
if sum >= n:
	borrow = sum - n
	print(int(borrow))
elif sum <= n:
	print('0')


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
w = w + 1
i = int(0)
p = int(0)
f = int(0)
for i in range(1, w, 1):
	f = i * k
	p = p + f
if p > n:
	d = p - n
	print(d)
else:
	print(0)


from sys import stdin

def main():
	entrada = [int(x) for x in stdin.readline().strip().split()]
	w = entrada[2]
	k = entrada[0]
	n = entrada[1]
	prestamo = 0
	cantidad = 0
	for i in range(1, w + 1):
		cantidad += k * i
	prestamo = n - cantidad
	if prestamo < 0:
		print(abs(prestamo))
	else:
		print(0)
main()


(x, y, z) = input().split()
x = int(x)
y = int(y)
z = int(z)
q = y - x * (z * (z + 1) // 2)
if q < 0:
	print(-q)
else:
	print(0)


import sys

def main():
	(k, n, w) = [int(i) for i in input().split()]
	f = lambda k, w: k * (w * w + w) / 2
	val = max(0, f(k, w) - n)
	sys.stdout.write('%s\n' % int(val))
main()


l = list(map(int, input().split()))
r = []
for i in range(1, l[2] + 1):
	r.append(i * l[0])
c = sum(r) - l[1]
if c != l[1] and c > 0:
	print(c)
else:
	print('0')


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
a = 0
b = 0
e = 1
while e <= w:
	a = e * k
	b = b + a
	e += 1
if b > n:
	print(b - n)
else:
	print(0)


(k, n, w) = (int(v) for v in input().split())
pay = w * (1 + w) // 2 * k
borrow = pay - n if pay > n else 0
print(borrow)


data = [int(x) for x in input().split(' ')]
price = (data[0] + data[0] * data[2]) / 2 * data[2]
if price <= data[1]:
	print(0)
else:
	print(int(price - data[1]))


(c, d, n) = map(int, input().split())
s = 0
for i in range(1, n + 1):
	s += i * c
if d < s:
	print(s - d)
else:
	print('0')


(a1, m, n) = map(int, input().split())
mx = max(n * (2 * a1 + (n - 1) * a1) // 2 - m, 0)
print(mx)


(k, n, w) = map(int, input().split())
if 1 <= k and w <= 1000 and (0 <= n <= pow(10, 9)):
	price = 0
	borrow = 0
	for i in range(w):
		price += (i + 1) * k
	if price > n:
		borrow = price - n
	print(borrow)


k = input()
e = k.split(' ')
j = []
a = 0
for i in e:
	j.append(int(i))
b = j[2]
for i in range(1, b + 1):
	a += i * j[0]
if j[1] >= a:
	print('0')
else:
	print(a - j[1])


a = input()
b = a.split(' ')
b[0] = int(b[0])
b[1] = int(b[1])
b[2] = int(b[2])
f = b[0]
m = b[0]
c = 0
while c < b[2]:
	b[0] = b[0] + f
	f = f + m
	c = c + 1
b[0] = b[0] - m
if str(b[0] - b[1])[0] == '-':
	print(0)
else:
	print(b[0] - b[1])


(a, b, c) = map(int, input().split())
s = 0
for i in range(1, c + 1):
	s += i * a
if s < b:
	print(0)
	exit()
print(s - b)


import math
(k, n, w) = list(map(int, input().split()))
rem = 0
for i in range(1, w + 1):
	n = n - i * k
if n < 0:
	print(abs(n))
else:
	print(0)


(k, n, w) = input().split()
total = 0
for i in range(int(w) + 1):
	total = total + i
print([0, total * int(k) - int(n)][total * int(k) - int(n) > 0])


import math
(k, n, w) = [int(i) for i in input().split()]
amount = int(k * (w + 1) * (w / 2))
print(amount - n if amount > n else 0)


(k, n, w) = input().split(' ')
k = int(k)
n = int(n)
w = int(w)
cost = 0
for m in range(1, w + 1, 1):
	cost += m * k
borrow = cost - n
if borrow < 0:
	borrow = 0
print(borrow)


(k, n, w) = [int(x) for x in input().split()]

def sum_of_numbers(n):
	return round(n / 2 * (n + 1))

def positive_or_zero(n):
	return n if n > 0 else 0
print(positive_or_zero(k * sum_of_numbers(w) - n))


a = input()
b = []
for i in range(len(a)):
	if a[i] == ' ':
		b.append(i)
k = int(a[:b[0]])
n = int(a[b[0] + 1:b[1]])
w = int(a[b[1] + 1:])
t = k * (w * (w + 1)) / 2 - n
if int(t) >= 0:
	print(int(t))
else:
	print(0)


print([max(0, a[0] * a[2] * (a[2] + 1) // 2 - a[1]) for a in [list(map(int, input().split()))]][0])


asd = input()
arr = asd.split(' ')
dol = 0
for n in range(1, int(arr[2]) + 1):
	dol += n * int(arr[0])
if dol - int(arr[1]) > 0:
	print(dol - int(arr[1]))
else:
	print(0)


(k, n, w) = map(int, input().split())
wynik = 0
for i in range(1, w + 1):
	wynik = wynik + i * k
out = wynik - n
if wynik < n:
	print('0')
else:
	print(out)


(k, n, w) = [int(a) for a in input().split()]

def money(k, w):
	return int(k * w * (w + 1) / 2)
r = money(k, w)
if n > r:
	print('0')
else:
	print(r - n)


L = input().split(' ')
for i in range(len(L)):
	L[i] = int(L[i])
myiter = iter(L)
(k, n, w) = [myiter.__next__() for i in range(3)]
cost = 0
summe = 0
for i in range(1, w + 1, 1):
	summe += i * k
if n >= summe:
	print('0')
else:
	print(summe - n)


(price, money, bananas) = map(int, input().split(' '))
totalCost = 0
for i in range(1, bananas + 1):
	totalCost += i * price
borrow = totalCost - money
if borrow < 0:
	print(0)
else:
	print(borrow)


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
x = 1
y = 0
z = 0
while 1 <= k <= 1000 and 1 <= w <= 1000 and (0 <= n <= 1000000000):
	if x <= w:
		y = y + x * k
		x = x + 1
	else:
		z = y - n
		if z <= 0:
			print('0')
			break
		elif z > 0:
			print(z)
			break


(k, n, w) = map(int, input().split())
m = k * (w * (w + 1) / 2)
if n > m:
	n = m
print(int(m - n))


(banana_cost, money, bananas) = map(int, input().split())
total_cost = banana_cost * (bananas * (bananas + 1) // 2)
if total_cost <= money:
	print(0)
else:
	print(total_cost - money)


m = input().split()
x = int(m[0])
y = int(m[1])
z = int(m[2])
i = 1
sum = 0
while i <= z:
	sum = sum + i * x
	i += 1
if sum > y:
	print(sum - y)
elif sum <= y:
	print(0)


rawInput = input('')
initialBananaCost = int(rawInput.split(' ')[0])
initialMoney = int(rawInput.split(' ')[1])
bananasToBuy = int(rawInput.split(' ')[2])
cost = 0
for i in range(bananasToBuy):
	cost = cost + (i + 1) * initialBananaCost
if cost <= initialMoney:
	print('0')
	exit()
cost = cost - initialMoney
print(cost)


(k, n, w) = map(int, input().split())
ans = w / 2 * (k + k * w)
if ans > n:
	print(f'{ans - n:.0f}')
else:
	print(0)


a = list(map(int, input().split()))
b = 0
for r in range(1, a[2] + 1):
	b = a[0] * r + b
if b < a[1]:
	print(0)
else:
	print(b - a[1])


(k, n, w) = [int(i) for i in input().split()]
money = 0
for i in range(1, w + 1):
	money += i * k
borrow = money - n
output = max(borrow, 0)
print(output)


m = input().split()
m = [int(i) for i in m]
c = m[0]
b = m[1]
n = m[2]
t = 0
for i in range(1, n + 1):
	t += i * c
if t - b > 0:
	print(t - b)
else:
	print(0)


def get_borrow_cost():
	(first_banana_cost, money, banana_count) = [int(x) for x in input().split()]
	total_banana_cost = 0
	for banana_number in range(1, banana_count + 1):
		total_banana_cost += banana_number * first_banana_cost
	return total_banana_cost - money if total_banana_cost > money else 0
print(get_borrow_cost())


a_complex_list = input()
a_complex_list = a_complex_list.split(' ')
price_for_a_banana = int(a_complex_list[0])
pocket = int(a_complex_list[1])
number_of_bananas = int(a_complex_list[2])
sum = 0
if number_of_bananas != 0:
	for c in range(1, number_of_bananas + 1, 1):
		sum = sum + price_for_a_banana * c
if pocket <= sum:
	amount_to_borrow = sum - pocket
elif pocket > sum:
	amount_to_borrow = 0
print(amount_to_borrow)


(m, a, n) = [int(i) for i in input().split()]
c = sum((i * m for i in range(1, n + 1))) - a
print(c if c >= 0 else 0)


(k, m, b) = input().split()
k = int(k)
m = int(m)
b = int(b)
c = 0
for i in range(1, b + 1):
	c += i * k
if c > m:
	print(c - m)
else:
	print('0')


import math
import sys
inp = list(map(int, input().split()))
k = inp[0]
n = inp[1]
w = inp[2]
m = k * round((w * w + w) / 2)
if m - n < 0:
	print(0)
else:
	print(m - n)


text = input()
text = text.split()
t_l = []
for i in text:
	t_l.append(int(i))
k = t_l[0]
n = t_l[1]
w = t_l[2]
total_cost = 0
for i in range(1, w + 1):
	total_cost += k * i
final_cost = total_cost - n
if final_cost < 0:
	print('0')
else:
	print(final_cost)


numbers = input().split()
k = int(numbers[0])
n = int(numbers[1])
w = int(numbers[2])

def money_necessary(k, w):
	cost = 0
	for i in range(w):
		cost += (i + 1) * k
	return cost
result = money_necessary(k, w) - n
if result >= 0:
	print(result)
else:
	print(0)


rint = lambda : int(input())
rmint = lambda : map(int, input().split())
rlist = lambda : list(rmint())
(k, n, w) = rlist()
total = int((w + 1) * w / 2 * k)
if total <= n:
	print(0)
else:
	print(total - n)


(k, n, w) = list(map(int, input().split()))

def S(w):
	total = w * (w + 1) // 2
	return total
if S(w) * k - n > 0:
	print(S(w) * k - n)
else:
	print(0)


ipt = input().split(' ')
price = int(ipt[0])
money = int(ipt[1])
bananas = int(ipt[2])
if bananas % 2 == 0:
	total = price * ((bananas + 2) / 2) * (bananas - 1) + price - money
else:
	total = price * ((bananas + 1) / 2) * bananas - money
if total >= 0:
	print(int(total))
else:
	print('0')


(cost, money, need) = input().split()
need = int(need)
cost = int(cost)
money = int(money)
total = 0
for i in range(1, need + 1):
	total += i * cost
left = total - money
if left > 0:
	print(total - money)
else:
	print('0')


inp1 = str(input())
inp = inp1.split()
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
add = 0
j = 1
while j <= w:
	add = add + k * j
	j += 1
ans = add - n
if ans > 0:
	print(ans)
else:
	print('0')


a = input()
(k, n, w) = a.split()
k = int(k)
n = int(n)
w = int(w)
val = k * w * (w + 1)
val = val / 2
ans = int(val - n)
if ans < 0:
	print(0)
else:
	print(ans)


(k, n, w) = input().split(' ')
k = int(k)
n = int(n)
w = int(w)
ass = 0
for i in range(w + 1):
	ass = ass + i
	if i == w + 1:
		break
cost = k * ass
borrow = cost - n
if borrow >= 0:
	print(borrow)
else:
	print('0')


l = list(map(int, input().strip().split()))
original = l[0]
initial_amount = l[1]
want = l[2]
count = 0
for i in range(1, want + 1):
	count = count + original * i
if count > initial_amount:
	print(count - initial_amount)
else:
	print(0)


s = input()
S = s.split()
k = int(S[0])
n = int(S[1])
w = int(S[2])
d = k * w * (w + 1) / 2 - n
if d <= 0:
	print('0')
else:
	print(int(d))


def calcTotal(k, w):
	return k * (w * (w + 1) // 2)

def moneyNeeded(k, n, w):
	total = calcTotal(k, w)
	return 0 if n >= total else total - n
(k, n, w) = map(int, input().split())
ans = moneyNeeded(k, n, w)
print(ans)


knw = list(input().split())
k = int(knw[0])
n = int(knw[1])
w = int(knw[2])
p = w * (w + 1) / 2 * k
b = p - n
if b > 0:
	print(int(b))
else:
	print(0)


(x, y, z) = input().split(' ')
costFirstBanana = int(x)
initialDollars = int(y)
bananas = int(z)
totalCost = 0
for i in range(0, bananas):
	if i == 0:
		totalCost += costFirstBanana
	else:
		totalCost += (i + 1) * costFirstBanana
if totalCost > initialDollars:
	print(totalCost - initialDollars)
else:
	print(0)


(k, n, w) = map(lambda x: int(x), input().split())
p = 0
for i in range(w):
	x = (i + 1) * k
	p = p + x
if p > n:
	print(p - n)
else:
	print(0)


line = input().split(' ')
dollars_per_banana = int(line[0])
has_dollars = int(line[1])
num_bananas = int(line[2])
total = [x for x in range(dollars_per_banana * num_bananas, 0, -dollars_per_banana)]
owe = sum(total) - has_dollars
if owe < 0:
	print(0)
else:
	print(owe)


(k, n, w) = map(int, input().split())
s_1 = int(w * (w + 1) / 2)
s_2 = k * s_1
ans = s_2 - n
if ans < 0:
	print(0)
else:
	print(ans)


(a, b, c) = [int(i) for i in input().split()]
d = [a * i for i in range(1, c + 1)]
d = sum(d)
if d - b > 0:
	print(d - b)
else:
	print(0)


def main():
	ints = input().split(' ')
	ints = [int(a) for a in ints]
	borrow = ints[0] * ints[2] * (ints[2] + 1) / 2 - ints[1]
	borrow = int(borrow)
	if borrow > 0:
		print(borrow)
	else:
		print('0')
main()


import collections

def read():
	return input().strip()

def readInt():
	return int(input().strip())

def readList():
	return list(map(int, input().strip().split()))

def solve(k, n, w):
	cost = k * w * (w + 1) // 2
	if cost <= n:
		return 0
	else:
		return cost - n
[k, n, w] = readList()
print(solve(k, n, w))


(k, n, w) = map(int, input().split())
moneyNeeded = w * (w + 1) / 2 * k
if moneyNeeded <= n:
	print('0')
else:
	moneyBorrow = int(moneyNeeded - n)
	print(moneyBorrow)


total = 0
(banana_cost, money, banana_count) = input().split()
banana_cost = int(banana_cost)
banana_count = int(banana_count)
money = int(money)
for i in range(1, banana_count + 1):
	total += i * banana_cost
print(total - money if total > money else '0')


def progress(a):
	return a * (a + 1) // 2
(k, n, w) = map(int, input().split())
if progress(w) * k - n < 1:
	print(0)
else:
	print(progress(w) * k - n)


(k, n, w) = list(map(int, input().split()))
l = []
for i in range(1, w + 1):
	l.append(i * k)
a = sum(l)
if a > n:
	print(a - n)
else:
	print('0')


s = input().strip()
ls = s.split(' ')
k = int(ls[0])
n = int(ls[1])
w = int(ls[2])
total = 0
for i in range(0, w):
	total += k * (i + 1)
if total > n:
	print(total - n)
else:
	print(0)


try:
	(k, n, w) = input().split(' ')
	if int(k) >= 1 and int(k) <= 1000 and (int(w) >= 1) and (int(w) <= 1000) and (int(n) >= 0) and (int(n) <= 10 ** 9):
		cost = (int(k) + int(w) * int(k)) / 2 * int(w)
		if cost > int(n):
			print(int(cost - int(n)))
		else:
			print(0)
except Exception as e:
	print(e)


def program(k, n, w):
	cost = 0
	for i in range(1, w + 1):
		cost += k * i
	if cost <= n:
		return 0
	return cost - n
(k, n, w) = list(map(int, input().strip().split()))
print(program(k, n, w))


in_str = [int(i) for i in input().split()]
(k, n, w) = (in_str[0], in_str[1], in_str[2])
total = w * (w + 1) / 2 * k
net_borrow = int(total - n)
print(net_borrow) if net_borrow > 0 else print(0)


s = input()
l = s.split()
k = int(l[0])
n = int(l[1])
w = int(l[2])
count = 1
total = 0
while count <= w:
	total = total + count * k
	count = count + 1
if n > total:
	print(0)
else:
	print(total - n)


(cost, dollars, noOfBananas) = map(int, input().split(' '))
bill = sum([(i + 1) * cost for i in range(noOfBananas)])
if bill > dollars:
	print(bill - dollars)
else:
	print(0)


(k, n, w) = (int(val) for val in input().split(' '))
has_to_pay = sum((i * k for i in range(2, w + 1))) + k
print(abs(n - has_to_pay) if has_to_pay > n else 0)


intp = list(input().split(' '))
first_cost = int(intp[0])
dol_num = int(intp[1])
nec_bans = int(intp[-1])
req_dol = 0
for i in range(nec_bans):
	req_dol += (i + 1) * first_cost
if dol_num > req_dol:
	print(0)
else:
	req_dol -= dol_num
	print(req_dol)


data = input()
date_int = [int(x) for x in data.split(' ')]
k = date_int[0]
n = date_int[1]
w = date_int[2]
output = 0
full_cost = 0
for i in range(w):
	full_cost += k * (i + 1)
need = full_cost - n
if need <= 0:
	need = 0
print(need)


(bprice, dollars, bcount) = map(int, input().split())
n = 0
for i in range(1, bcount + 1):
	n += bprice * i
if n - dollars <= 0:
	print(0)
	exit()
print(n - dollars)


(k, w, n) = input().split()
k = int(k)
w = int(w)
n = int(n)
total_price = k * (n // 2 * (n + 1) if not n % 2 else n * ((n + 1) // 2))
print(total_price - w if total_price > w else '0')


(banana_1, money, bananas) = map(int, input().split())
cost = 0
for num_banana in range(1, bananas + 1):
	cost += banana_1 * num_banana
debt = money - cost
if debt < 0:
	print(abs(debt))
else:
	print('0')


import math
(K, N, W) = map(int, input().split())
count = 0
for i in range(1, W + 1):
	count += K * i
if count - N <= 0:
	print('0')
else:
	print(count - N)


(a, b, n) = list(map(int, input().split(' ')))
s = 0
s = n / 2 * (2 * a + (n - 1) * a)
if s > b:
	print(int(s - b))
else:
	print('0')


(k, n, w) = list(map(int, input().split()))
totalCost = sum(list(range(k, k * (w + 1), k)))
moneyToBorrow = n - totalCost
if moneyToBorrow >= 0:
	print(0)
else:
	print(abs(moneyToBorrow))


(k, n, w) = [int(x) for x in input().split()]
money = int(w * (w + 1) * k / 2)
total = max(money - n, 0)
print(total)


n = list(map(int, input().split(' ')))
count = 0
for i in range(n[2]):
	count = count + n[0] * (i + 1)
if count > n[1]:
	print(count - n[1])
else:
	print('0')


def total_price(price, quantity):
	(i, total) = (1, 0)
	for _ in range(quantity):
		total += price * i
		i += 1
	return total
(k, n, w) = input().split()
amount_to_borrow = total_price(int(k), int(w)) - int(n)
print(amount_to_borrow) if amount_to_borrow > 0 else print(0)


cost = int()
data = str(input()).split()
for i in range(1, int(data[2]) + 1):
	cost += i * int(data[0])
if cost - int(data[1]) >= 0:
	print(cost - int(data[1]))
else:
	print(0)


(a, b, c) = map(int, input().split())
x = (a + a * c) * c // 2
if x > b:
	print(abs(b - x))
else:
	print(0)


inp = input()
var_list = inp.split()
(k, n, w) = (int(var_list[0]), int(var_list[1]), int(var_list[2]))
final_price = 0
for banana_number in range(1, w + 1):
	final_price += k * banana_number
if final_price > n:
	print(final_price - n)
else:
	print(0)


knm = input().split()
k = int(knm[0])
n = int(knm[1])
m = int(knm[2])
(a, b, c, q) = ([], [], 0, 0)
for i in range(1, m + 1):
	a.append(i)
for i in range(len(a)):
	b.append(k * a[i])
if sum(b) >= n:
	print(abs(n - sum(b)))
else:
	print(0)


(k, n, w) = map(int, input().split())
price = k * w * (w + 1) / 2
if n >= price:
	print('0')
else:
	borrow = price - n
	result = int(borrow)
	print(result)


(k, n, w) = map(int, input().split())
summ = 0
dolg = 0
for i in range(w + 1):
	summ = summ + k * i
if n >= summ:
	print(0)
elif summ > n:
	dolg = summ - n
	print(dolg)


from sys import stdin, stdout

def main():
	(k, n, w) = map(int, stdin.readline().rstrip().split())
	cost = int(w * (w + 1) / 2 * k)
	borrow = cost - n
	if borrow < 0:
		borrow = 0
	stdout.write(str(borrow) + '\n')
main()


(k, n, w) = (int(item) for item in input().strip().split(' '))
acc = 0
i = 1
totals = (k * w + 1 * k) * w // 2
print((0, totals - n)[totals - n > 0])


(w, x, y) = map(int, input().split())
t = 0
for i in range(1, y + 1):
	t = t + w * i
if x >= t:
	print(0)
else:
	print(t - x)


(k, i, w) = map(int, input().split())
borrow = int(k * w * (w + 1) / 2) - i
if borrow < 0:
	print(0)
else:
	print(borrow)


(a, b, c) = map(int, input().split())
p = c * a + c * (c - 1) * a / 2
if p > b:
	l = p - b
else:
	l = 0
print(int(l))


a = [int(i) for i in input().split()]
k = a[0]
n = a[1]
w = a[2]
y = 0
for i in range(99999999999999999999):
	if w - i != 0:
		y += w - i
	else:
		break
if y * k >= n:
	print(y * k - n)
else:
	print(0)


w = input().split(' ')
k = int(w[0])
money = int(w[1])
n = int(w[2])
tot = int(k * (1 + n) * n / 2)
borrow = tot - money
if borrow < 0:
	borrow = 0
print(borrow)


(a, s, d) = map(int, input().split())
d = int(d * (d + 1) / 2)
d = d * a
d = d - s
if d < 0:
	d = 0
print(d)


def consecutives_sum(n):
	sums = [0] * (n + 1)
	for i in range(1, n + 1):
		sums[i] = sums[i - 1] + i
	return sums[n]
(k, n, w) = map(int, input().split())
print(k * consecutives_sum(w) - n if k * consecutives_sum(w) - n > 0 else 0, end='')


inp = list(map(int, input().split()))
k = inp[0]
n = inp[1]
w = inp[2]
stoim = 0
for x in range(w + 1):
	cena = x * k
	stoim += cena
if n - stoim >= 0:
	print(0)
else:
	print(abs(n - stoim))


x = input()
x = x.split()
for i in range(len(x)):
	x[i] = int(x[i])
r = x[0]
g = x[1]
b = x[2]
res = 0
for i in range(1, b + 1):
	res += i * r
res = res - g
if res < 1:
	print(0)
else:
	print(res)


[costPerBanana, dollars, bananasToBuy] = [int(i) for i in input().split()]
totalCost = 0
for i in range(1, bananasToBuy + 1):
	totalCost += i * costPerBanana
answer = totalCost - dollars
print(0 if answer < 0 else answer)


(k, n, w) = [int(i) for i in input().split()]
sum_of_series = 2 * k + (w - 1) * k
sum_of_series *= w
sum_of_series //= 2
x = sum_of_series - n
if x < 0:
	print(0)
else:
	print(x)


(x, y, z) = [int(a) for a in input().split()]
cost = 0
for i in range(1, z + 1):
	cost += x * i
if cost > y:
	print(abs(cost - y))
else:
	print('0')


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def countX(lst, x):
	count = 0
	for ele in lst:
		if ele == x:
			count = count + 1
	return count
r = inlt()
k = r[0]
n = r[1]
w = r[2]
bill = 0
while w != 0:
	bill = bill + k * w
	w = w - 1
if bill <= n:
	print(0)
else:
	print(abs(n - bill))
min = 0
temp = 0
s = ''


(k, n, w) = [int(x) for x in input().split()]
total_money = 0
for i in range(1, w + 1):
	total_money += i * k
borrow = total_money - n
if borrow < 0:
	print(0)
else:
	print(borrow)


(k, n, w) = input().split()
m = []
for x in range(int(w)):
	m.append((x + 1) * int(k))
if sum(m) > int(n):
	print(abs(int(n) - sum(m)))
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
i = 1
exp = 0
while 1 <= i <= w:
	exp = exp + i * k
	i = i + 1
m = exp - n
if m > 0:
	print(m)
else:
	print('0')


l = list(map(int, input().split()))
rezult = 0
firstprice = l[0]
havedollars = l[1]
wantbananas = l[2]
for i in range(0, wantbananas + 1):
	rezult += i
if rezult * firstprice - havedollars <= 0:
	print(0)
else:
	print(rezult * firstprice - havedollars)


(Banana, Dallors, numOfB) = map(int, input().split())
total = 0
for i in range(1, numOfB + 1):
	a = i * Banana
	total += a
if total == Dallors or total < Dallors:
	print(0)
else:
	print(total - Dallors)


(k, n, w) = map(int, input().split())
amt = 1
total = []
x = []
for i in range(w):
	total.append(amt * k)
	amt += 1
x.append(sum(total) - n)
if n >= sum(total):
	print(0)
else:
	print(sum(x))


(k, n, w) = list(map(int, input().strip().split()))
cost = 0
for i in range(1, w + 1):
	cost += i * k
if cost >= n:
	money_borrowed = cost - n
else:
	money_borrowed = 0
print(money_borrowed)


def solve(k: int, n: int, w: int) -> int:
	cost = int(k * w * (w + 1) / 2)
	if cost - n > 0:
		return cost - n
	return 0
(k, n, w) = list(map(int, input().split()))
print(solve(k, n, w))


n = [int(x) for x in input().split()]
c = 0
for j in range(1, n[-1] + 1):
	c += n[0] * j
print(c - n[1] if c > n[1] else '0')


KNW = input().split(' ')
k = int(KNW[0])
n = int(KNW[1])
w = int(KNW[2])
price = k * sum(range(1, w + 1))
borrow = price - n
if borrow > 0:
	print(borrow)
elif borrow <= 0:
	print(0)


t = input()
l = list(map(int, t.split(' ')))
n = l[2]
a = l[0]
d = l[0]
p = n / 2 * (2 * a + (n - 1) * d)
if l[1] < p:
	print(int(p - l[1]))
else:
	print(0)


import sys

def Q15(lis):
	res = lis[2] * (lis[2] + 1) / 2 * lis[0] - lis[1]
	if res < 0:
		return 0
	return int(res)
line = input()
values = list(map(int, line.split()))
print(Q15(values))


l = [int(x) for x in input().split()]
k = l[0]
s = l[1]
n = l[2]
p = 0
for i in range(1, n + 1):
	p += i * k
p = p - s
if p <= 0:
	print(0)
else:
	print(p)


t = input().split(' ')
ans = -int(t[1]) + int(t[0]) * int(t[2]) * (int(t[2]) + 1) / 2
if ans > 0:
	print(int(ans))
else:
	print(0)


import sys
if False:
	input = open('soldier.txt', 'r')
else:
	input = sys.stdin
all = input.readline().split()
k = int(all[0])
n = int(all[1])
w = int(all[2])
totalcost = 0
costnext = 0
for i in range(w + 1):
	costnext = i * k
	totalcost = totalcost + costnext
if totalcost <= n:
	print('0')
else:
	print(str(totalcost - n))


(k, n, w) = map(int, input().split())
res = sum([i * k for i in range(1, w + 1)])
print([abs(n - res), 0][n - res > 0])


(k, n, w) = [int(x) for x in input().split(' ')]
dollars_present = 0
for i in range(1, w + 1):
	dollars_present += k * i
	if dollars_present >= n:
		dollars_needed = dollars_present - n
	else:
		dollars_needed = 0
print(dollars_needed)


(price, money, cant) = input().split()
(price, money, cant) = (int(price), int(money), int(cant))
finalPrice = 0
for i in range(1, cant + 1):
	finalPrice += i * price
borrow = finalPrice - money
if borrow > 0:
	print(borrow)
else:
	print(0)


(k, n, w) = map(int, input().split())
c = 0
for i in range(1, w + 1):
	c = c + i * k
b = c - n
if b <= 0:
	b = 0
print(b)


a = input()
b = a.split(' ')
c = []
ab = 0
cb = 0
for i in b:
	c.append(int(i))
cb = c[2]
for i in range(1, cb + 1):
	ab += i * c[0]
if c[1] >= ab:
	print(0)
else:
	print(ab - c[1])


ins = [int(n) for n in input().split(' ')]
cost = ins[0]
money = ins[1]
bananas = ins[2]
total_cost = 0
for i in range(1, bananas + 1):
	total_cost += cost * i
borrow = total_cost - money
if borrow <= 0:
	print(0)
else:
	print(borrow)


from math import ceil
import sys, bisect, copyreg, copy, statistics, os

def inp():
	return sys.stdin.readline().strip()

def IIX():
	return (int(x) for x in sys.stdin.readline().split())

def II():
	return int(inp())

def LI():
	return list(map(int, inp().split()))

def L(x):
	return list(x)

def out(var):
	return sys.stdout.write(str(var))
(k, n, w) = IIX()
cost = k * (w * (w + 1) // 2)
if cost - n >= 0:
	out(cost - n)
else:
	out(0)


import math
import sys
import string

def ri():
	return input()

def ii():
	return int(input())

def li():
	return input().split()

def mi():
	return list(map(int, input().split()))
(k, n, w) = mi()
total = 0
for i in range(1, w + 1):
	total += k * i
if total > n:
	print(total - n)
else:
	print(0)


from sys import *
import sys
import math
(k, n, w) = map(int, input().split())
km = 0
nm = abs(n - k)
for i in range(2, w + 1):
	km = km + i * k
if n == 0:
	print(abs(km - nm + 2 * k))
elif km < nm:
	print('0')
elif km != 0:
	print(abs(km - nm))
else:
	print('0')


(k, n, w) = map(int, input().split())
sum_w = (1 + w) / 2 * w * k
if sum_w % 1.0 < 1e-09:
	sum_w = int(sum_w)
if sum_w <= n:
	print(0)
else:
	print(sum_w - n)


(a, b, c) = map(int, input().split())
cost = []
for x in range(1, c + 1):
	cost.append(a * x)
if sum(cost) > b:
	print(sum(cost) - b)
else:
	print('0')


(k, n, w) = input().split()
(k, n, w) = (eval(k), eval(n), eval(w))
i = 0
sum = 0
tmp = k
while i < w:
	sum += k
	k += tmp
	i += 1
if sum > n:
	x = sum - n
	print(x)
else:
	print(0)


data = input()
(start_cost, start_money, need_to_buy) = data.split()

def count_additional_funds(banana_cost, money, need_to_buy):
	count = 0
	while need_to_buy > 0:
		count += need_to_buy
		need_to_buy -= 1
	additional_funds = money - banana_cost * count
	return -additional_funds if additional_funds < 0 else 0
print(count_additional_funds(int(start_cost), int(start_money), int(need_to_buy)))


word = input()
lista = word.split()
lis = []
for a in lista:
	nro = int(a)
	lis.append(nro)
k = lis[0]
n = lis[1]
w = lis[2]
precio = 0
for i in range(w + 1):
	precio += i * k
if precio <= n:
	print('0')
else:
	print(precio - n)


inp = input().split()
firstBananaValue = int(inp[0])
dollersSoldier = int(inp[1])
bananasWanted = int(inp[2])
moneyNeeded = 0
for i in range(1, bananasWanted + 1):
	moneyNeeded += firstBananaValue * i
if moneyNeeded - dollersSoldier < 0:
	print('0')
else:
	print(moneyNeeded - dollersSoldier)


(cost, dollars, num_banana) = map(int, input().split())
total_cost = (1 + num_banana) * num_banana // 2 * cost
print(max(0, total_cost - dollars))


import math
from fractions import Fraction as frac
MOD = 1000000000.0 + 7

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def solve(case_no):
	(k, n, w) = map(int, input().split())
	print(max(0, k * w * (w + 1) // 2 - n))
t = 1
for i in range(1, t + 1):
	solve(i)


(d, k, n) = map(int, input().split())
sum = 0
for i in range(1, n + 1):
	sum = sum + i * d
r = sum - k
if r > 0:
	print(r)
else:
	print(0)


data = input().split()
(k, n, w) = [int(i) for i in data]
money_required = k * w * (w + 1) // 2
print(money_required - min(money_required, n))


[k, n, w] = [int(i) for i in input().split()]
faktor = w * (w + 1) // 2
dollers = faktor * k
output = dollers - n
if output < 0:
	output = 0
print(output)


x = list(map(int, input().split()))
k = x[0]
n = x[1]
w = x[2]
list1 = []
c = 0
g = 0
for i in range(0, w + 1):
	g = k * c + g
	c += 1
if g > n:
	print(g - n)
else:
	print('0')


(price_first_banana, dollars, num_bananas) = map(int, input().split())
price_all_bananas = num_bananas * (num_bananas + 1) // 2 * price_first_banana
borrow = max(0, price_all_bananas - dollars)
print(borrow)


def soldierandBananas(inp):
	k = inp[0]
	n = inp[1]
	w = inp[2]
	result = 0
	for i in range(1, int(w) + 1):
		result += i * k
	if result > n:
		print(result - n)
	else:
		print(0)
soldierandBananas(list(map(int, input().split())))


(a, k, c) = map(int, input().split(' '))
t = a * c * (c + 1) // 2
if k >= t:
	print('0')
else:
	print(t - k)


(ban_price, Dollar, pices) = input().split()
tem = 0
for i in range(1, int(pices) + 1):
	tem += int(ban_price) * i
x = tem - int(Dollar)
if x <= 0:
	print(0)
else:
	print(x)


input_knw = input()
input_knw = input_knw.split(' ')
input_knw = list(map(int, input_knw))
k = input_knw[0]
n = input_knw[1]
w = input_knw[2]
total_payment = 0
for i in range(1, w + 1):
	total_payment = total_payment + i * k
if total_payment - n > 0:
	print(total_payment - n)
else:
	print(0)


L = input()
L = L.split()
k = int(L[0])
n = int(L[1])
w = int(L[2])
Aux = 0
for i in range(w):
	Aux += (i + 1) * k
if n >= Aux:
	print('0')
else:
	print(Aux - n)


import sys
import math
import bisect

def main():
	(k, n, w) = map(int, input().split())
	m = k * w * (w + 1) // 2
	if m > n:
		print(m - n)
	else:
		print(0)
main()


x = list(map(int, input().split()))
p = 0
for i in range(1, x[2] + 1):
	p += i * x[0]
t = p - x[1]
if t > 0:
	print(t)
else:
	print(0)


import sys
(k, n, w) = map(int, input().split(' '))
c = k * (w * (w + 1) // 2)
if c - n > 0:
	print(c - n)
else:
	print(0)


a = input()
a = [int(i) for i in a.split(' ')]
total = []
unit = a[0]
for i in range(1, a[2] + 1):
	b = i * unit
	total.append(b)
result = sum(total) - a[1]
if result < 0:
	result = 0
print(result)


(cost, dollars, bananas) = map(int, input().split())
totalCost = bananas * (bananas + 1) // 2 * cost
borrow = 0
if totalCost > dollars:
	borrow = totalCost - dollars
print(borrow)


a = []
s = input()
a = list(s.split(' '))
k = int(a[0])
n = int(a[1])
w = int(a[-1])
l = 0
for i in range(w):
	l = l + (i + 1) * k
if n < l:
	print(abs(n - l))
else:
	print('0')


(k, n, w) = [int(elem) for elem in input().split()]
total = (1 + w) / 2 * w * k - n
if total <= 0:
	print(0)
else:
	print(int(total))


def seperateints(x):
	k = ''
	l = []
	for i in x:
		if i == ' ':
			l.append(int(k))
			k = ''
			continue
		k = k + i
	l.append(int(k))
	return l
l = seperateints(input())
n = 0
for i in range(1, l[2] + 1):
	n = n + i * l[0]
if n > l[1]:
	print(n - l[1])
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
amount = []
for x in range(1, w + 1):
	price = x * k
	amount.append(price)
total = 0
for x in range(0, len(amount)):
	total = total + amount[x]
if n < total:
	print(total - n)
else:
	print(0)


i = 1
(a, b, c) = map(int, input().split())
total = 0
for x in range(c):
	total += a * i
	i += 1
if total > b:
	b = total - b
	print(b)
else:
	print(0)


(k, q, w) = map(int, input().split())
if w % 2 == 0:
	P = (w + 1) * w * k / 2
else:
	P = w * (w - 1) * k / 2 + w * k
M = P - q
if M < 0:
	M = 0
print(int(M))


prompt = input().split(' ')
prompt = [int(i) for i in prompt]
temp = int(prompt[2] * (prompt[2] + 1) / 2 * prompt[0] - prompt[1])
if temp < 0:
	print(0)
else:
	print(temp)


def cost_banana(k, n, w):
	total_cost = 0
	for i in range(w):
		i = i + 1
		total_cost += i * k
	borrow_money = total_cost - n
	if borrow_money <= 0:
		return 0
	else:
		return borrow_money
	print(total_cost - n)
(k, n, w) = list(map(int, input().split()))
print(cost_banana(k, n, w))


(a, b, c) = (int(i) for i in input().split())
v = a * c * (c + 1) / 2
print(int(v - b)) if v - b > 0 else print(0)


(n, m, o) = map(int, input().split())
ans = 0
o = o * (o + 1) // 2
ans = o * n - m
if ans <= 0:
	ans = 0
print(ans)


def soldier_and_bananas():
	(k, n, w) = map(int, input().split())
	prize = 0
	for num in range(w):
		prize = prize + (num + 1) * k
	print(prize - n if prize - n > 0 else 0)
	return
soldier_and_bananas()


data = input()
(price_first, dollars, number_banana) = data.split(' ')
price_first = int(price_first)
dollars = int(dollars)
number_banana = int(number_banana)
total_cost = price_first * (number_banana * (number_banana + 1) // 2)
if total_cost - dollars < 0:
	print(0)
else:
	print(total_cost - dollars)


data = input()

def data_check(d):
	flag = d.split(' ')
	val = money_generator(flag[0], flag[2])
	borrow = val - int(flag[1])
	return borrow

def money_generator(price, amount):
	sum = 0
	for x in range(1, int(amount) + 1):
		sum += int(price) * x
	return sum
b = data_check(data)
if b > 0:
	print(b)
else:
	print(0)


arr = list(map(int, input().split()))
n = arr[2]
if n == 0:
	print(0)
else:
	pr = n * (n + 1) // 2 * arr[0]
	if pr > arr[1]:
		print(pr - arr[1])
	else:
		print(0)


nums = [int(x) for x in input().split()]
k = nums[0]
n = nums[1]
w = nums[2]
total = (w + 1) * w // 2 * k
if n > total:
	print(0)
else:
	print(total - n)


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
totalcost = 0
for items in range(1, w + 1):
	totalcost += items * k
if totalcost > n:
	print(totalcost - n)
else:
	print('0')


(k, n, w) = input().split(' ')
k = int(k)
n = int(n)
w = int(w)
a = 1
tp = 0
while w > 0:
	p = a * k
	a += 1
	tp = tp + p
	w -= 1
if tp - n > 0:
	print(tp - n)
else:
	print(0)


(k, m, n) = map(int, input().split())
ans = n * (n + 1) * k
ans = ans // 2
if m > ans:
	print('0')
else:
	ans = abs(m - ans)
	print(ans)


(k, n, w) = map(int, input().split())
print(int(abs(min(n - k * w * (w + 1) * 0.5, 0))))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
x = 1
s = 0
l = 1
for i in range(w):
	l = x * k
	s = s + l
	x += 1
borrowed = s - n
if borrowed > 0:
	print(borrowed)
if borrowed <= 0:
	print(0)


a = list(map(int, input().strip().split()))
k = a[0]
n = a[1]
w = a[2]
b = int(w * (w + 1) * 0.5 * k) - n
if b > 0:
	print(b)
else:
	print(0)


(initial, money, bananas) = input().split()
(initial, money, bananas) = (int(initial), int(money), int(bananas))
cost = 0
for i in range(1, bananas + 1):
	cost += i * initial
if cost - money < 0:
	print(0)
else:
	print(cost - money)


def main():
	(k, n, w) = input().split(' ')
	sum = 0
	i = 0
	while i < int(w):
		sum += int(k) * (i + 1)
		i += 1
	if sum - int(n) >= 0:
		print(sum - int(n))
	else:
		print(0)
main()


inp = input().split(' ')
each_price = int(inp[0])
amount_present = int(inp[1])
n = int(inp[2])
total = each_price * n * (n + 1) // 2
if total < amount_present:
	print('0')
else:
	print(total - amount_present)


(bananaCost, dollars, bananasWanted) = map(int, input().split())
sumCost = (bananasWanted + 1) * bananasWanted // 2 * bananaCost
if sumCost <= dollars:
	print(0)
else:
	print(sumCost - dollars)


l = list(map(int, input().strip().split()))[:3]
n = l[0]
k = l[1]
w = l[2]
a = 0
i = 1
v = n
for i in range(w):
	i += 1
	v = n * i
	a += v
if a - k > 0:
	print(a - k)
else:
	print(0)


(a, b, c) = input().split()
initCost = int(a)
money = int(b)
bananas = int(c)
totalCost = 0
for x in range(bananas):
	totalCost += bananas * initCost
	bananas -= 1
	toBorrow = totalCost - money
if toBorrow <= 0:
	print(0)
else:
	print(toBorrow)


(cost, funds, bananas) = input().split()
total_cost = 0
cost = int(cost)
funds = int(funds)
bananas = int(bananas)
for i in range(1, bananas + 1):
	total_cost += i * cost
if funds - total_cost >= 0:
	print(0)
else:
	print(total_cost - funds)


n1 = input()
n = n1.split()
list1 = []
for i in range(len(n)):
	list1.append(int(n[i]))
total = 0
c = 1
while c <= list1[2]:
	total = total + c * list1[0]
	c += 1
if total > list1[1]:
	borrow = total - list1[1]
	print(borrow)
else:
	print('0')


(K, N, W) = map(int, input().split())
X = (K + K * W) * W // 2
print(max(X - N, 0))


knw = list(map(int, input().rstrip().split()))
(k, n, w) = knw
money = int(k * w * (w + 1) / 2)
if money - n <= 0:
	print(0)
else:
	print(money - n)


(k, n, w) = [int(i) for i in input().split()]
price = []
for i in range(1, w + 1):
	price.append(k * i)
borrow = sum(price) - n
if borrow > 0:
	print(borrow)
else:
	print(0)


a = input()
r = a.find(' ')
k = int(a[:r])
a = a[r + 1:]
r = a.find(' ')
w = int(a[:r])
a = a[r + 1:]
n = int(a)
s = int(0)
s = (k + k * n) * n // 2
print(max(0, s - w))


a = list(map(int, input().split()))
sum = (a[0] * a[2] + a[0]) * a[2] / 2
due = 0 if sum == a[1] or a[1] > sum else sum - a[1]
print(int(due))


(k, n, w) = [int(i) for i in input().split()]
total_ammount_of_money = 0
for i in range(w):
	total_ammount_of_money += (i + 1) * k
money_borrowed = total_ammount_of_money - n
if money_borrowed > 0:
	print(money_borrowed)
else:
	print('0')


a = input()
a = a.split()
prec1b = int(a[0])
dine = int(a[1])
ban = int(a[2])
prectotal = sum((i * prec1b for i in range(1, ban + 1)))
if prectotal > dine:
	print(prectotal - dine)
else:
	print(0)


(x, y, z) = map(int, input().split())
print(max(0, sum((x * (i + 1) for i in range(z))) - y))


k = 0
while k < 1:
	y = [int(x) for x in input().split()]
	k += 1
x = y
a = x[0]
b = x[1]
c = x[2]
d = int(a * (c * (c + 1)) / 2)
if d > b:
	e = d - b
else:
	e = 0
print(e)


lista = input().split()
costFirstBanana = int(lista[0])
soliderDolarsAtStart = int(lista[1])
bananasHeWants = int(lista[2])
bananas = 0
TotalPayment = 0
for i in range(bananasHeWants + 1):
	bananas = costFirstBanana * i
	TotalPayment += bananas
if soliderDolarsAtStart > costFirstBanana and bananasHeWants == 1:
	print(0)
elif TotalPayment - soliderDolarsAtStart < 0:
	print(0)
else:
	print(TotalPayment - soliderDolarsAtStart)


(k, n, w) = map(int, input().split())
res = 0
mult = 1
for i in range(w):
	res = res + (i + 1) * k
res = res - n
if res < 0:
	res = 0
print(res)


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
p = int(w * (w + 1) / 2) * k
b = p - n
if b < 0:
	b = 0
print(b)


def main():
	(k, n, w) = map(int, input().split())
	prices = []
	for i in range(1, w + 1):
		prices.append(i * k)
	res = sum(prices) - n
	print(res if res >= 0 else 0)
main()


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(k, n, w) = map(int, input().split())
res = sum([i * k for i in range(1, w + 1)]) - n
if res <= 0:
	print(0)
else:
	print(res)


ls = list(map(int, input().split()))
k = ls[0]
n = ls[1]
w = ls[2]
s = 0
for i in range(1, w + 1):
	s += i * k
if s > n:
	print(s - n)
else:
	print(0)


n = input()
(pric, wall, num) = n.split(' ')
total = 0
while int(num) != 0:
	total += int(num) * int(pric)
	num = int(num) - 1
if total > int(wall):
	print(total - int(wall))
else:
	print(0)


from sys import stdin
from functools import reduce
a = stdin.readline().rstrip().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
cost = sum(list(map(lambda x: x * k, range(1, w + 1))))
if cost <= n:
	print(0)
else:
	print(cost - n)


data = list(map(int, input().split()))
cost = data[0]
money = data[1]
bananas = data[2]
total = 0
for i in range(1, bananas + 1):
	total += cost * i
if total <= money:
	print(0)
else:
	print(total - money)


(k, n, w) = map(int, input().rstrip().split())
sum = w * (w + 1)
l = sum // 2
new = l * k
if new < n:
	print(0)
else:
	print(new - n)


(k, n, w) = list(map(int, input().split()))
cost = 0
for a in range(1, w + 1):
	cost += k * a
borrowed = cost - n
if borrowed < 0:
	print(0)
else:
	print(borrowed)


(k, n, m) = input().split()
k = int(k)
n = int(n)
m = int(m)
l = [k]
for i in range(m - 1):
	l.append((i + 2) * k)
if sum(l) > n:
	print(sum(l) - n)
else:
	print(0)


inputs = list(map(int, input().split()))
(k, n, w) = (inputs[0], inputs[1], inputs[2])
total = int((k + k * w) * w / 2)
if total - n > 0:
	print(total - n)
else:
	print(0)


try:
	(k, n, w) = map(int, input().split())
	ans = k * (w * (w + 1) // 2)
	if ans - n > 0:
		print(ans - n)
	else:
		print(0)
except:
	pass


(k, n, w) = [int(elem) for elem in input().split()]
count = 2
b = k
while True:
	n = n - b
	w -= 1
	b = k * count
	count += 1
	if w == 0:
		break
if n >= 0:
	print(0)
else:
	print(-n)


(k, n, w) = [int(_) for _ in input().split()]
cost = k * w * (w + 1) // 2
a = cost - n
if a <= 0:
	print(0)
else:
	print(a)


inputgegevens = input()
gegevens = list(map(int, inputgegevens.split(' ')))
kost = int(gegevens[0])
geldbeschikbaar = int(gegevens[1])
aantal = int(gegevens[2])
geldnodig = 0
for i in range(1, aantal + 1):
	geldnodig += i * kost
if geldnodig <= geldbeschikbaar:
	print(0)
else:
	print(geldnodig - geldbeschikbaar)
print


(x, y, z) = input().split()
(base, dollars, total) = (int(x), int(y), int(z))
price = 0
for b in range(1, total + 1):
	price += b * base
if dollars < price:
	print(abs(dollars - price))
else:
	print(0)


(k, n, w) = map(int, input().split())
sm = 0
for ch in range(w + 1):
	c = ch * k
	sm = sm + c
if sm > n:
	r = sm - n
	print(r)
else:
	print('0')


n = [int(i) for i in input().split()]
p = sum((n[0] * i for i in range(n[2] + 1)))
print(max(0, p - n[1]))


(price, amount, q) = map(int, input().split())
total = 0
for i in range(1, q + 1):
	total += i * price
debt = total - amount
if debt > 0:
	print(debt)
else:
	print(0)


values = input().split()
values = [int(i) for i in values]
borrow = sum(range(values[0], values[2] * values[0] + 1, values[0])) - values[1]
if borrow <= 0:
	print('0')
else:
	print(borrow)


(k, n, w) = input().split(' ')
k = int(k)
n = int(n)
w = int(w)
full_price = 0
for i in range(w):
	full_price += (i + 1) * k
print(max(0, full_price - n))


line = input().strip().split()
init_price_banana = int(line[0])
init_money = int(line[1])
numbers_banana = int(line[2])
total = 0
for i in range(1, numbers_banana + 1):
	total += i * init_price_banana
res = total - init_money
if res > 0:
	print(res)
else:
	print(0)


li = list(map(int, input().split()))
price = li[0]
ii = li[1]
amount = li[2]
total = 0
borrow = 0
if price >= 1 and ii >= 0:
	while amount >= 1:
		price = li[0] * amount
		total += price
		amount -= 1
borrow = total - ii
if borrow >= 0:
	print(borrow)
elif borrow <= 0:
	print(0)


(x, y, z) = list(map(int, input().split()))
i = 1
tot = 0
while i <= z:
	tot += x * i
	i += 1
if tot > y:
	print(tot - y)
else:
	print(0)


def mysum(w):
	result = w
	for i in range(w):
		result += i
	return result
a = input().split(' ')
numlist = []
for num in a:
	numlist.append(int(num))
k = numlist[0]
n = numlist[1]
w = numlist[2]
sumw = mysum(w)
cost = sumw * k
remainder = cost - n
if remainder < 0:
	print(0)
else:
	print(remainder)


input_data = input()
list_we_use = input_data.split(' ')
f = []
a = 0
for i in list_we_use:
	f.append(int(i))
b = f[2]
for i in range(1, b + 1):
	a += i * f[0]
if f[1] >= a:
	print('0')
else:
	print(a - f[1])


(K, N, W) = input().split()
k = int(K)
n = int(N)
w = int(W)
t = k * w * (w + 1) // 2
if t <= n:
	print(0)
else:
	print(t - n)


inp = input(str())
num = inp.split(' ')
k = int(num[0])
n = int(num[1])
w = int(num[2])
total_price = 0
for i in range(1, w + 1):
	total_price += i * k
if total_price <= n:
	borrow = 0
else:
	borrow = total_price - n
print(borrow)


def sum(n):
	s = 0
	for i in range(1, int(n) + 1):
		s += i
	return s

def result():
	l = [int(i) for i in input().split()][:3]
	s = sum(l[2])
	cost = s * l[0]
	res = cost - l[1]
	if res > 0:
		print(res)
	else:
		print('0')
result()


(k, n, w) = map(int, input().split())
total_cost = w / 2 * (k + w * k)
if total_cost < n:
	print(0)
else:
	recquired_money = total_cost - n
	print(int(recquired_money))


string = input().split(' ')
k = int(string[0])
w = int(string[1])
n = int(string[2])
i = 1
sum = 0
while i <= n:
	sum += i * k
	i += 1
if sum - w > 0:
	print(sum - w)
else:
	print(0)


(k, n, w) = list(map(int, input().split()))
totalprice = 0
i = 1
while i <= w:
	totalprice += i * k
	i += 1
balance = totalprice - n
if balance < 0 or balance == 0:
	print(0)
elif balance > 0:
	print(balance)


knw = input().split()
y = 0
x = 0
for (j, i) in enumerate(range(int(knw[2]))):
	x = (j + 1) * int(knw[0])
	y += x
if y - int(knw[1]) > 0:
	print(y - int(knw[1]))
else:
	print('0')


def A546():
	(k, n, w) = list(map(int, input().split(' ')))
	cost = k * w * (w + 1) * 0.5
	if cost > n:
		print(int(cost - n))
	else:
		print(0)
A546()


from sys import stdin, stdout
inp = stdin.readline
out = stdout.write
(k, n, w) = map(int, inp().strip().split())
s = max(0, w * (w + 1) // 2 * k - n)
out(str(s))


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
tk = 0
t = 0
for x in range(1, w + 1):
	tk = x * k
	t += tk
if t > n:
	print(t - n)
else:
	print(0)


(k, n, m) = map(int, input().split())
total = 0
for i in range(1, m + 1):
	total = total + i * k
t = total - n
if t <= 0:
	print('0')
else:
	print(t)


(k, n, w) = map(int, input().split())

def main():
	remaining = n
	for i in range(w):
		cost = (i + 1) * k
		remaining -= cost
	if remaining < 0:
		print(abs(remaining))
	else:
		print(0)
if __name__ == '__main__' and k >= 1 and (w <= 1000) and (n >= 0) and (n <= 10 ** 9):
	main()


inp = input()
inp = inp.split()
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
sums = 0
init = k * w
for item in range(w):
	sums += init
	init -= k
if sums - n <= 0:
	print(0)
else:
	print(sums - n)


(k, n, w) = tuple(map(int, input().split()))
sum = 0
while w > 0:
	sum = sum + w * k
	w = w - 1
if sum > n:
	print(sum - n)
else:
	print(0)


soldier = [int(i) for i in input().split()]
harga = (soldier[2] ** 2 + soldier[2]) * soldier[0] // 2 - soldier[1]
print(harga if harga > 0 else 0)


(cost, balance, want) = map(int, input().split())
totalcost = (1 + want) * want / 2 * cost
print('0' if totalcost < balance else int(totalcost - balance))


def moneyRequired(k, n, w):
	return max(int(w * (w + 1) * k / 2) - n, 0)
(k, n, w) = [int(i) for i in input().split()]
print(moneyRequired(k, n, w))


(price, available_money, bananas) = map(int, input().split())
total = 0
for i in range(1, bananas + 1):
	total += i * price
if total <= available_money:
	print(0)
else:
	print(total - available_money)


(k, n, w) = [int(i) for i in input().split()]
d = int(w / 2 * (k + k * w)) - n
print(d) if d > 0 else print('0')


a = input()
b = a.split()
total = int(b[0]) * (int(b[2]) ** 2 + int(b[2])) / 2
if int(b[1]) >= total:
	print('0')
else:
	print(int(total - int(b[1])))


(k, n, w) = map(int, input().split())
s = w * (k + w * k) // 2
r = max(s - n, 0)
print(r)


masukan = input().split()
k = int(masukan[0])
n = int(masukan[1])
w = int(masukan[2])
hasil = 0
for i in range(1, w + 1):
	hasil += i * k
sisa = hasil - n
if sisa < 0:
	sisa = 0
print(sisa)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
total = 0
for i in range(w):
	total = total + k * (i + 1)
needed = total - n
if total == 1 or needed < 0:
	print(0)
else:
	print(needed)


p = [int(i) for i in input().split(' ')]
(tot, price) = (0, 0)
for j in range(1, p[2] + 1):
	tot += j * p[0]
price = tot - p[1]
if price < 0:
	price = 0
print(price)


l = [int(i) for i in input().split()]
k = l[0]
n = l[1]
w = l[2]
y = [k]
for i in range(1, w):
	x = k + k * i
	y.append(x)
if n >= sum(y):
	print('0')
else:
	print(sum(y) - n)


(k, n, w) = map(int, input().split())
tot = w * (k * w + k) // 2
borrow = tot - n
if borrow >= 0:
	print(borrow)
else:
	print(0)


(k, n, w) = [int(x) for x in input().split()]
total = 0
need = 0
for i in range(1, w + 1):
	total += i * k
if total > n:
	need = total - n
print(need)


data = list(map(int, input().split()))
i = 0
price = 0
for banana in range(1, data[2] + 1):
	price += banana * data[0]
if price > data[1]:
	print(price - data[1])
else:
	print(0)


n = list(map(int, input().split()))
l = []
for i in range(1, n[2] + 1):
	s = i * n[0]
	l.append(s)
	d = sum(l)
if d <= n[1]:
	print(0)
elif d > n[1]:
	print(d - n[1])


(k, n, w) = list(map(int, input().split()))
amount = 0
for x in range(1, w + 1):
	c = x * k
	amount += c
need = amount - n
if need > 0:
	print(need)
else:
	print(0)


string = input()
numbers_list = string.split()
k = int(numbers_list[0])
n = int(numbers_list[1])
w = int(numbers_list[-1])
summa = 0
i = 0
while i <= w:
	summa = summa + k * i
	i += 1
result = summa - n
if result < 0:
	print('0')
else:
	print(result)


(l, n, w) = map(int, input().split())
b = 0
p = 2
k = l
while w > 0:
	if n > k:
		n = n - k
		k = p * l
		p = p + 1
		w = w - 1
	else:
		while w > 0:
			b += k
			k = p * l
			p = p + 1
			w = w - 1
if b - n >= 0:
	print(b - n)
else:
	print(0)


a = [int(x) for x in input().split(' ')]
count = 0
for i in range(1, a[2] + 1):
	count += a[0] * i
if count > a[1]:
	print(count - a[1])
else:
	print(0)


(k, n, w) = map(int, input().split())

def getCost(k, w):
	cost = 0
	for i in range(1, w + 1):
		cost += k * i
	return cost
cost = getCost(k, w)

def borrow(n, cost):
	if cost > n:
		need = cost - n
	else:
		need = 0
	return need
need = borrow(n, cost)
print(need)


(a, b, c) = map(int, input().split())
s = 0
for i in range(1, c + 1):
	s += a * i
print(max(0, s - b))


(k, n, w) = map(int, input().strip().split())
total = 0
for i in range(1, w + 1):
	total += k * i
if total > n:
	print(total - n)
elif total <= n:
	print(0)


(k, n, w) = map(int, input().split())
m = 0
for i in range(w + 1):
	if i > 0:
		l = k * i
		m = m + l
if m > n:
	z = m - n
	print(z)
else:
	z = 0
	print(z)


(x, y, z) = map(int, input().split())
r = list(range(1, z + 1))
if sum(r) * x <= y:
	print(0)
else:
	print(sum(r) * x - y)


(k, n, w) = map(int, input().split())
a = k * sum(list(range(1, w + 1))) - n
print(str(a) if a >= 0 else '0')


(price, init, banan) = map(int, input().split())
cost = 0
for x in range(banan):
	cost += (x + 1) * price
if init > cost:
	print('0')
else:
	print(cost - init)


(x, y, z) = [int(a) for a in input().split()]
s = 0
for i in range(1, z + 1):
	k = x * i
	s = s + k
if s > y:
	print(s - y)
else:
	print('0')


(k, n, w) = str(input()).split(' ')
k = int(k)
n = int(n)
w = int(w)
value = int((w * w + w) / 2) * k - n
print(max(value, 0))


count = 0
string = str(input()).split(' ')
w = int(string[2])
n = int(string[1])
k = int(string[0])
list_ = []
for num in range(1, w + 1):
	count = k * num
	list_.append(count)
result = sum(list_) - n
if result <= 0:
	print(0)
else:
	print(result)


l = list(map(int, input().split()))
k = l[0]
n = l[1]
w = l[2]
s = w * (w + 1) * k / 2
res = int(s - n)
if res > 0:
	print(res)
else:
	print('0')


(k, b, w) = list(map(int, input().split()))
j = int(w * k / 2 * (w + 1) - b)
if j >= 0:
	print(j)
else:
	print(0)


(k_cost_of_the_first_banana, n_initial_number_of_dollars_the_soldier_has, w_number_of_bananas_he_wants) = list(map(int, input().split(' ')))
total_cost_of_bananas = 0
for i in range(0, w_number_of_bananas_he_wants + 1):
	total_cost_of_bananas += k_cost_of_the_first_banana * i
amount_of_dollars_to_borrow = total_cost_of_bananas - n_initial_number_of_dollars_the_soldier_has
if amount_of_dollars_to_borrow < 0:
	amount_of_dollars_to_borrow = 0
print(amount_of_dollars_to_borrow)


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
tot = sum(range(w + 1)) * k
if tot > n:
	print(tot - n)
else:
	print('0')


(a, b, c) = map(int, input().split())
while c > 0:
	d = c * a
	b = b - d
	c = c - 1
if b > 0:
	b = 0
print(abs(b))


(d, money, n) = map(int, input().split())
sum = n / 2 * (2 * d + (n - 1) * d)
if sum > money:
	print(int(abs(sum - money)))
else:
	print('0')


import math
(k, n, w) = map(int, input().split())
t = k * sum(range(1, w + 1)) - n
if t <= 0:
	print(0)
else:
	print(t)


(k, n, w) = tuple((int(v) for v in input().split()))
m = k * ((1 + w) * w // 2)
print(m - n if m > n else 0)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools

def MI():
	return map(int, sys.stdin.readline().strip().split())

def main():
	(k, n, w) = MI()
	p = k * (w * (w + 1) // 2)
	if p > n:
		print(p - n)
	else:
		print(0)
main()


(k, n, v) = map(int, input().split())
s = 0
for i in range(1, v + 1):
	s = s + i * k
if n - s >= 0:
	print(0)
else:
	print(s - n)


inp = input().split()
inp = [int(i) for i in inp]
borr = int(inp[2] * (inp[2] + 1) / 2) * inp[0] - inp[1]
print(borr if borr > 0 else 0)


from sys import stdin, stdout
(k, n, w) = map(int, stdin.readline().split())
c = k * (w * (w + 1) // 2)
d = n - c
if d < 0:
	print(abs(d))
else:
	print(0)


(a, b, c) = map(int, input().split())
m = 0
for i in range(1, c + 1):
	p = a * i
	m = m + p
	i = i + 1
if b <= m:
	print(m - b)
else:
	print('0')


(st, m, n) = input().split()
st = int(st)
m = int(m)
n = int(n)
x = 0
for i in range(1, n + 1):
	x += i
x *= st
if m >= x:
	print(0)
else:
	print(x - m)


l = [int(e) for e in input().split()]
pb = 0
for i in range(1, l[2] + 1):
	pb += i * l[0]
e = pb - l[1]
if e <= 0:
	print(0)
else:
	print(e)


(k, n, w) = map(int, input().split())
p = 0
if w > 0:
	i = 1
	while i <= w:
		p += i
		i += 1
l = k * p - n
if l <= 0:
	print('0')
else:
	print(l)


(k, n, w) = list(map(int, input().split()))
t = w * (k + w * k) / 2
if n < t:
	print(int(t - n))
else:
	print(0)


def Soldier_and_bananas():
	(cost, money, bananas) = input().split()
	(cost, money, bananas) = (int(cost), int(money), int(bananas))
	total = 0
	for i in range(1, bananas + 1):
		total += cost * i
	borrow = total - money
	if borrow > 0:
		print(borrow)
	else:
		print(0)
Soldier_and_bananas()


inp = input().strip().split()
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
cost_b = 0
for i in range(1, w + 1):
	cost_b += i * k
if cost_b >= n:
	print(cost_b - n)
else:
	print(0)


def count_banana_cost(k, w):
	cost = 0
	for i in range(1, w + 1):
		cost += i * k
	return cost

def must_borrow(cost):
	if n - banana_cost > 0:
		return 0
	return abs(n - banana_cost)
(k, n, w) = list(map(int, input().split()))
banana_cost = count_banana_cost(k, w)
print(must_borrow(banana_cost))


CiagZKlawiatury = input().split(' ')
K = int(CiagZKlawiatury[0])
N = int(CiagZKlawiatury[1])
W = int(CiagZKlawiatury[2])
PierwszyBanan = K
OstatniBanan = PierwszyBanan * W
SredniaCena = (PierwszyBanan + OstatniBanan) / 2
SumaKosztow = SredniaCena * W
Wynik = N - SumaKosztow
if Wynik <= 0:
	print(int(Wynik * -1))
else:
	print('0')


n = list(map(int, input().split(' ')))
(price, dollars, bananas) = (n[0], n[1], n[2])
totalPrice = 0
for i in range(1, bananas + 1):
	totalPrice += price * i
print(0 if totalPrice < dollars else abs(totalPrice - dollars))


(k, n, w) = list(map(int, input().strip().split()))
w1 = k * w * (w + 1) / 2
w2 = w1 - n
if w2 >= 0:
	print(int(w2))
else:
	print(0)


(y, x, a) = map(int, input().split())
q = 0
w = 0
for i in range(1, a + 1):
	q += y * i
if q > x:
	print(q - x)
else:
	print(w)


(a, b, c) = map(int, input().split())
k = (a + a * c) * c // 2
if b > k:
	print(0)
else:
	print(k - b)


inputTokens = input().split(' ')
k = int(inputTokens[0])
n = int(inputTokens[1])
w = int(inputTokens[2])
totalPrice = 0
for num in range(1, w + 1):
	totalPrice += num * k
b = totalPrice - n
if b > 0:
	print(b)
else:
	print(0)


get = lambda : list(map(int, input().split()))
(k, n, w) = get()
print(max(k * w * (w + 1) // 2 - n, 0))


(q, w, e) = [int(x) for x in input().split()]
z = e * (e + 1) // 2 * q
if w > z:
	print(0)
else:
	print(z - w)


cin = lambda : map(int, input().split())
(k, w, n) = cin()
res = (2 * k + (n - 1) * k) * n // 2
print((0, res - w)[res > w])


def bananas(cost, dollars, bananas_wanted):
	total = cost * (bananas_wanted * (bananas_wanted + 1) / 2) - dollars
	total = int(total)
	if total > 0:
		print(total)
	else:
		print(0)

def main():
	args = input()
	args = args.split()
	k = int(args[0])
	n = int(args[1])
	w = int(args[2])
	bananas(k, n, w)
main()


arr = list(map(int, input().split(' ')))
k = arr[0]
n = arr[1]
w = arr[2]
s = k
i = 2
while i <= w:
	s = s + i * k
	i = i + 1
if s > n:
	print(s - n)
else:
	print(0)


try:
	(k, n, w) = map(int, input().split())
	total = 0
	for i in range(1, w + 1):
		total += i * k
	if total < n:
		print(0)
	else:
		print(total - n)
except EOFError:
	pass


(x, y, z) = input().split()
x = int(x)
y = int(y)
z = int(z)
count = 0
for i in range(z + 1):
	count += i * x
if y >= count:
	print(0)
else:
	dollars = count - y
	print(dollars)


import sys
local_launch = False
try:
	open('LOCAL').read()
	local_launch = True
except:
	pass
input_data = open('INPUT.txt').read() if local_launch else sys.stdin.read()
done = {'i': 0}
tokens = input_data.split()

def next_token():
	result = tokens[done['i']]
	done['i'] += 1
	return result

def next_int():
	return int(next_token())

def next_str():
	return next_token()
k = next_int()
n = next_int()
w = next_int()
a = 1
i = 1
while i != w:
	i = i + 1
	a = a + i
u = a * k
if n - u < 0:
	print(u - n)
else:
	print(0)


L = list(input().split(' '))
cost = int(L[0])
amt = int(L[1])
piece = int(L[2])
req = 0
for i in range(1, piece + 1):
	req += i * cost
if req - amt < 0:
	print('0')
else:
	print(req - amt)


a = input()
b = a.split()
ban = int(b[0])
mon = int(b[1])
num = int(b[2])
cost = 0
num2 = num + 1
for i in range(1, num2):
	cost = cost + i
cost1 = cost * ban
if cost1 - mon > 0:
	print(cost1 - mon)
else:
	print('0')


(k, n, w) = map(int, input().split(' '))
p = k * w / 2 * (w + 1)
q = p - n
if n > p:
	print(0)
	exit(0)
if q == 0:
	print(0)
	exit(0)
print(int(q))


(k, n, w) = input().strip().split()
(k, n, w) = (int(k), int(n), int(w))
tot = 0
for i in range(1, w + 1):
	tot = tot + i * k
need = tot - n
if need > 0:
	print(need)
else:
	print(0)


data = input().split(' ')
data = list(map(int, data))
totalCost = 0
for i in range(1, data[2] + 1):
	totalCost += data[0] * i
if totalCost - data[1] >= 0:
	print(abs(totalCost - data[1]))
else:
	print(0)


import sys, threading
sys.setrecursionlimit(10 ** 8)
threading.stack_size(10 ** 8)
from collections import defaultdict, Counter
from queue import Queue
import math

def main():
	(k, n, w) = map(int, input().split())
	money = 0
	for i in range(w):
		money += (i + 1) * k
	print(max(money - n, 0))
threading.Thread(target=main).start()


a = input()
a = a.split(' ')
c = a[0]
b = a[1]
f = a[2]
sum = 0
for i in range(int(f) + 1):
	sum += int(c) * i
if sum - int(a[1]) > 0:
	print(sum - int(a[1]))
else:
	print(0)


(k, m, n) = map(int, input().split())
z = 0
for i in range(1, n + 1):
	z = z + i * k
if z - m > 0:
	print(z - m)
elif z - m <= 0:
	print(0)


x = input().split()
a = int(x[2])
r = 0
w = 0
while w != int(x[2]):
	r = r + int(x[0]) * a
	a -= 1
	w += 1
d = r - int(x[1])
if d > 0:
	print(d)
else:
	print('0')


x = list(map(int, input().split()))
k = x[0]
n = x[1]
w = x[2]
Cost = w * (w + 1) * (1 / 2) * k
Ans = Cost - n
if Ans < 0:
	print(0)
else:
	print(int(Ans))


L = list(map(int, input().split()))
k = L[0]
n = L[1]
w = L[2]
c = 0
for i in range(w + 1):
	c += k * i
if c <= n:
	print(0)
else:
	print(c - n)


n = input().split(' ')
l = list(map(int, n))
s = l[2] / 2 * (2 * l[0] + (l[2] - 1) * l[0])
if s <= l[1]:
	print(0)
else:
	print(int(s - l[1]))


vec_sum = [0, 0, 0]
(a, b, c) = map(int, input().split())
arth_sum = a * (c / 2) * (2 + (c - 1))
print(int(arth_sum - b) if b < arth_sum else 0)


(A, B, C) = input('').split()
W = int(A)
R = int(B)
S = int(C)
T = [0]
Y = 0
X = 1
while Y != S:
	F = W * X
	T.append(F)
	Y = Y + 1
	X = X + 1
Q = sum(T)
Z = Q - R
if Z < 0:
	print('0')
else:
	print(Z)


x = input()
x = x.split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
su = 0
for i in range(1, c + 1):
	su = su + i * a
if su > b:
	print(su - b)
else:
	print('0')


def soldier(arr):
	k = arr[0]
	n = arr[1]
	w = arr[2]
	cost = []
	for i in range(1, w + 1):
		cost.append(i * k)
		pass
	total = sum(cost)
	br = total - n
	if br == 0 or br < 0:
		print(0)
		pass
	else:
		print(br)
		pass
arr = [int(i) for i in input().split(' ')]
soldier(arr)


(firstBananaPrice, initialCapital, bananaCount) = list(map(int, input().split()))
totalPrice = bananaCount * (bananaCount + 1) * firstBananaPrice // 2
print(max(totalPrice - initialCapital, 0))


def find_loan(price, money_left, bananas):
	total_price = 0
	for i in range(bananas):
		total_price = total_price + price * (i + 1)
	if total_price <= money_left:
		result = 0
	else:
		result = total_price - money_left
	return result
(a, b, c) = map(int, input(' ').split())
print(find_loan(a, b, c))


def solve(k, n, w):
	a = w * (w + 1) * k // 2 - n
	if a < 0:
		return 0
	else:
		return a
t = 1
while t > 0:
	(k, n, w) = [int(x) for x in input().split()]
	print(solve(k, n, w))
	t -= 1


i = input()
l = list(i.split())
k = int(l[0])
m = int(l[1])
w = int(l[2])
s = 0
n = 1
while n <= w:
	s = s + n * k
	n = n + 1
if m > s:
	print(0)
else:
	print(s - m)


(harga, punya, banana) = map(int, input().split())
total = 0
for z in range(banana + 1):
	total += harga * z
pinjem = total - punya
if pinjem <= 0:
	print(0)
else:
	print(pinjem)


(a, b, c) = map(int, input().split())
count = 0
for i in range(1, c + 1):
	count = count + i * a
f = count - b
if f <= 0:
	print(0)
else:
	print(f)


inp = input().split()
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
mn = 0
for i in range(w + 1):
	mn = mn + i * k
x = mn - n
if x > 0:
	print(x)
else:
	print(0)


array = [int(x) for x in input().split()]
k = array[0]
n = array[1]
w = array[2]
i = 1
cost = 0
while i <= w:
	cost = cost + i * k
	i += 1
if n > cost:
	print('0')
else:
	print(cost - n)


inp = list(map(int, input().split()))
t = sum([inp[0] * (i + 1) for i in range(inp[2])]) - inp[1]
if t > 0:
	print(t)
else:
	print(0)


import math
import os
import sys
import re
import itertools
import functools
import operator
(k, n, w) = map(int, input().split())
print(max(k * w * (w + 1) // 2 - n, 0))


s = input().split()
k = eval(s[0])
n = eval(s[1])
w = eval(s[2])
m = w * (k + w * k) / 2
if m > n:
	d = m - n
	print(int(d))
else:
	p = 0
	print(p)


data = input()
data = data.split(' ')
coast_1 = int(data[0])
cash = int(data[1])
amount = int(data[2])
amount += 1
needed_cash = 0
for i in range(amount):
	needed_cash = needed_cash + coast_1 * i
if needed_cash > cash:
	print(needed_cash - cash)
else:
	print(0)


o = input()
da = o.split(' ')
p = []
do = 0
ty = 0
for i in da:
	p.append(int(i))
ty = p[2]
for i in range(1, ty + 1):
	do += p[0] * i
if p[1] >= do:
	print('0')
else:
	print(do - p[1])


s = input()
L = s.split(' ')
k = int(L[0])
n = int(L[1])
w = int(L[2])
cost = 0
for i in range(1, w + 1):
	cost += i * k
ans = cost - n
if ans < 0:
	ans = 0
print(ans)


def main():
	(k, n, w) = [int(v) for v in input().split()]
	c = w * (w + 1) // 2
	print(max(0, c * k - n))
main()


test = input().split()
cost = int(test[0])
money = int(test[1])
n = int(test[2])
total = 0
for i in range(n):
	total = total + cost * (i + 1)
res = total - money
if res < 0:
	print('0')
else:
	print(str(res))


(q, w, e) = map(int, input().split())
s = e * (e + 1) / 2 * q - w
if s <= 0:
	print(0)
else:
	print(int(s))


input_string = list(map(int, input().split()))
all_cost = 0
for i in range(1, input_string[2] + 1):
	all_cost += i * input_string[0]
if all_cost > input_string[1]:
	print(all_cost - input_string[1])
else:
	print('0')


(n, p, q) = map(int, input().split())
v = q * (q + 1) // 2
v = n * v
if v - p < 0:
	print(0)
else:
	print(v - p)


(bc, hav, req) = map(int, input().split())
tot = bc * (req * (req + 1)) // 2
if tot - hav > 0:
	print(tot - hav)
else:
	print(0)


input_data = input()
list_we_use = input_data.split(' ')
o = []
a = 0
for i in list_we_use:
	o.append(int(i))
p = o[2]
for i in range(1, p + 1):
	a += i * o[0]
if o[1] >= a:
	print('0')
else:
	print(a - o[1])


(cost, total_m, banana) = map(int, input().split(' '))
t = 0
for x in range(1, banana + 1):
	t += x * cost
if total_m > t:
	print(0)
else:
	print(t - total_m)


(a, w, n) = map(int, input().split())
print(max(n * (2 * a + (n - 1) * a) // 2 - w, 0))


(cost_of_each_banana, amount, no_of_bananas) = map(int, input().split())
total_amount = cost_of_each_banana * (no_of_bananas * (no_of_bananas + 1) // 2)
if total_amount <= amount:
	print(0)
else:
	print(total_amount - amount)


(k, n, w) = map(int, input().split())
total = 0
for c in range(1, w + 1):
	total += k * c
if total - n == 0 or total - n < 0:
	print(0)
else:
	print(total - n)


(a, k, n) = input().split()
a = int(a)
k = int(k)
n = int(n)
s = 0.0
s = n / 2 * (2 * a + (n - 1) * a)
if k < s:
	print(int(s - k))
else:
	print(0)


totIn = str(input())
totList = totIn.split()
cost = int(totList[0])
initBalance = int(totList[1])
numberWanted = int(totList[2])
totalCost = 0
multiplier = 1
for i in range(0, numberWanted):
	totalCost += multiplier * cost
	multiplier += 1
borrowed = 0
if totalCost > initBalance:
	borrowed = totalCost - initBalance
print(borrowed)


def main():
	line = input()
	array = line.split(' ')
	k = int(array[0])
	n = int(array[1])
	w = int(array[2])
	sum = 0
	for i in range(0, w):
		sum = sum + (i + 1) * k
	if sum <= n:
		print(0)
	else:
		print(sum - n)
main()


(k, n, w) = input().split()
s = 0
v = int(k)
h = 1
f = int(n)
for i in range(int(w)):
	s = s + h * v
	h += 1
d = s - f
if d < 0:
	print(0)
else:
	print(d)


(k, d, b) = map(int, input().split())
sum = 0
for s in range(1, b + 1):
	sum = sum + s * k
brrw = sum - d
if brrw > 0:
	print(brrw)
else:
	print(0)


nums = input().split()
k = eval(nums[0])
n = eval(nums[1])
w = eval(nums[2])
sum = w * (w + 1) / 2
req_amt = k * sum
amt_borrowed = int(req_amt - n)
if amt_borrowed > 0:
	print(amt_borrowed)
else:
	print(0)


l = str(input()).split(' ')
count = 0
for i in range(1, int(l[-1]) + 1):
	count += i * int(l[0])
x = count - int(l[1])
if x >= 0:
	print(x)
else:
	print('0')


(k, n, w) = map(int, input().rstrip().split(' '))
sum1 = 0
for i in range(1, w + 1):
	sum1 += i * k
if sum1 > n:
	print(sum1 - n)
else:
	print('0')


l = list(input().split(' '))
bananacost = int(l[0])
dollars = int(l[1])
bananas = int(l[2])
total = 0
for i in range(bananas):
	total += (i + 1) * bananacost
if total > dollars:
	print(total - dollars)
else:
	print('0')


__author__ = 'Silvio'
(k, n, w) = map(int, input().split())
s = w * (w + 1) // 2
print(max(0, s * k - n))


all = input()
dataList = all.split()
firstPay = int(dataList[0])
initialMoney = int(dataList[1])
bananasNeeded = int(dataList[2])
SUM = bananasNeeded / 2 * (2 * firstPay + (bananasNeeded - 1) * firstPay)
if SUM >= initialMoney:
	print(int(SUM - initialMoney))
else:
	print(0)


(cost, moneyOwned, noOfBananasHeWants) = input().split()
cost = int(cost)
moneyOwned = int(moneyOwned)
noOfBananasHeWants = int(noOfBananasHeWants)
payment = 0
for i in range(1, noOfBananasHeWants + 1):
	payment = payment + cost * i
if noOfBananasHeWants == 0 or cost == 0 or payment < moneyOwned or (payment == moneyOwned):
	print(0)
elif payment > moneyOwned:
	print(payment - moneyOwned)


(c, d, n) = map(int, input().split())
c = n * (n + 1) * c
c = c // 2
if c > d:
	print(c - d)
else:
	print(0)


def main():
	inp = input().split()
	(k, n, w) = (int(inp[0]), int(inp[1]), int(inp[2]))
	L = []
	for i in range(w + 1):
		L.append(i)
	print(sum(L) * k - n if sum(L) * k > n else 0)
main()


(a, b, c) = map(int, input().split())
d = 0
e = 1
f = a
for _ in range(c):
	d += a
	a = f * (e + 1)
	e += 1
if d > b:
	print(d - b)
else:
	print('0')


(K, N, W) = map(int, input().split())
total = K * W * (W + 1) // 2
borrow = int(total - N)
if total < N:
	print('0')
else:
	print(borrow)


(price, money, pieces) = map(int, input().split())
following = 0
for i in range(1, pieces + 1):
	following = price * i
	money -= following
if money <= 0:
	print(abs(money))
else:
	print('0')


def do(n):
	sum = 0
	for i in range(1, n[2] + 1):
		sum += i * n[0]
	res = sum - n[1]
	if res <= 0:
		return 0
	else:
		return res
n = list(map(int, input().split()))
print(do(n))


(k, n, w) = [int(x) for x in input().split()]
price = 0
for i in range(1, w + 1):
	price += i * k
if price > n:
	require = price - n
else:
	require = 0
print(require)


(k, n, w) = input().strip().split()[:3]
w = int(w)
n = int(n)
k = int(k)
s = 0
for x in range(1, w + 1):
	s = s + x * k
if s <= n:
	print(0)
else:
	print(s - n)


(k, n, w) = [int(i) for i in input().split()]
pr = 0
for i in range(1, w + 1):
	pr += i * k
r = pr - n
if r < 0:
	print(0)
else:
	print(r)


(pay, have, bananas) = map(int, input().split())
total = pay * sum(range(bananas + 1))
result = total - have
print(0 if result <= 0 else result)


import sys
lines = iter(sys.stdin.read().split('\n'))
(k, n, w) = map(int, next(lines).strip(' ').split(' '))
print(max(0, w * (w + 1) // 2 * k - n))


def totalmoney(k, n, w):
	s = 0
	for i in range(1, w + 1):
		s += k * i
	if s < n:
		print('0')
		return
	print(abs(n - s))
knw = list(map(int, input().split()))
k = knw[0]
n = knw[1]
w = knw[2]
totalmoney(k, n, w)


(n, k, p) = map(int, input().split())
ans = 0
for i in range(1, p + 1):
	ans = ans + i * n
if ans > k:
	print(ans - k)
else:
	print(0)


total = 0
count = 1
(k, n, w) = map(int, input().split())
while count <= w:
	total = total + count * k
	count = count + 1
m = total - n
if m < 0:
	print(0)
else:
	print(m)


def soliderAndBananas():
	values = input().split()
	totalCost = 0
	borrow = 0
	for i in range(int(values[2]) + 1):
		totalCost += int(values[0]) * i
	if totalCost <= int(values[1]):
		borrow = 0
	else:
		borrow = totalCost - int(values[1])
	print(borrow)
soliderAndBananas()


(c, n, w) = [int(x) for x in input().split()]
su = 0
for i in range(1, w + 1):
	su = su + c * i
if n <= su:
	print(su - n)
else:
	print('0')


def main():
	q = list(input().split(' '))
	k = int(q[0])
	n = int(q[1])
	w = int(q[2])
	sum1 = int(w / 2 * (2 * k + (w - 1) * k))
	if sum1 - n < 0:
		print(0)
	else:
		print(sum1 - n)
main()


knw = input()
knw = knw.split(' ')
k = int(knw[0])
n = int(knw[1])
w = int(knw[2])
total = (1 + w) * w / 2 * k
borrow = total - n
if total <= n:
	print('0')
elif borrow == int(borrow):
	print(int(borrow))
else:
	print(borrow)


a = list(map(int, input().split()))
ans = 0
for x in range(1, a[2] + 1):
	ans = ans + x * a[0]
ans = ans - a[1]
print(ans if ans > 0 else '0')


import math
import os
import random
import re
import sys

def function(m, n, r):
	i = m
	while r != 1:
		i = i + m * r
		r = r - 1
	diff = i - n
	if diff >= 0:
		print(diff)
	else:
		print(0)
mnr = input().rstrip().split()
m = int(mnr[0])
n = int(mnr[1])
r = int(mnr[2])
function(m, n, r)


(k, n, w) = [int(k) for k in input().split()][:3]
a = int(w * (w + 1) * (k / 2) - n)
if a >= 0:
	print(a)
else:
	print(0)


(s, n, r) = map(int, input().split())
print(max(s * r * (r + 1) // 2 - n, 0))


a = tuple(map(int, input().split()))
x = (a[2] + 1) * (a[2] // 2)
if a[2] % 2 == 1:
	x += int(a[2] / 2 + 0.5)
x *= a[0]
if x <= a[1]:
	print(0)
else:
	print(x - a[1])


def soldier_and_bananas():
	(k, n, w) = input().split()
	k = int(k)
	n = int(n)
	w = int(w)
	price = sum([i * k for i in range(1, w + 1)])
	print(max(0, price - n))
soldier_and_bananas()


inputdata = input()
total = 0
a = [int(x) for x in inputdata.split()]
for i in range(1, a[2] + 1, 1):
	total = total + i * a[0]
req_money = (a[1] - total) * -1
if req_money <= 0:
	req_money = 0
print(req_money)


ip = input()
l = ip.split(' ')
k = int(l[0])
n = int(l[1])
w = int(l[2])
s = 0
for i in range(w):
	s += (i + 1) * k
if s > n:
	print(str(s - n))
else:
	print(str(0))


entries = input()
entries = [int(i) for i in entries.split()]
cost = 0
for e in range(1, entries[2] + 1):
	cost += entries[0] * e
if entries[1] < cost:
	print(cost - entries[1])
else:
	print('0')


good = input().split()
k = int(good[0])
n = int(good[1])
w = int(good[2])
b = 0
for i in range(1, w + 1):
	b += i * k
if b <= n:
	print(0)
else:
	print(b - n)


def nat_sum(n):
	return n * (n + 1) // 2
(c, m, b) = map(int, input().split())
req = c * nat_sum(b)
bor = req - m
if bor > 0:
	print(bor)
else:
	print('0')


(k, n, w) = map(int, input().split())
total_cost = sum((a * k for a in range(1, w + 1)))
print(total_cost - n if total_cost > n else 0)


(k, n, w) = [int(y) for y in input().split()]
c = k * (w * (w + 1) // 2) - n
if c > 0:
	print(c)
else:
	print(0)


from array import array
from sys import stdin
import bisect
from bisect import *
import itertools
from itertools import *

def scan_gen():
	for line in stdin:
		yield from iter(line.split())
scan = scan_gen()

def nint():
	return int(next(scan))

def nintk(k):
	return tuple((nint() for _ in range(k)))

def nfloat():
	return float(next(scan))

def intar_init(size):
	return array('i', [0]) * size

def intar(size=None):
	if size == None:
		size = nint()
	arr = intar_init(size)
	for x in range(size):
		arr[x] = nint()
	return arr

def solve():
	(k, n, w) = nintk(3)
	p = k * w * (w + 1) // 2
	print(max(0, p - n))
	print()
solve()


(a, v, n) = map(int, input().split())
t = n * (2 * a + (n - 1) * a) // 2
if v > t:
	print(0)
else:
	print(t - v)


(k, n, w) = [int(x) for x in input().split()]
i = 1
s = 0
while w != 0:
	p = i * k
	s = s + p
	i = i + 1
	w = w - 1
if n > s or n == s:
	a = 0
	print(a)
else:
	a = n - s
	d = abs(a)
	print(d)


(c, d, n) = map(int, input().split())
i = 1
s = 0
while n:
	s += c * i
	i += 1
	n -= 1
if s - d <= 0:
	print(0)
else:
	print(s - d)


def loan_calculator(price, money, bananas):
	total_price = 0
	for i in range(1, bananas + 1):
		total_price += price * i
	if total_price > money:
		print(total_price - money)
	else:
		print(0)
(k, n, w) = map(int, input().split())
loan_calculator(k, n, w)


a = [int(i) for i in input().split()]
intialcost = a[0]
money = a[1]
banana = a[2]
n = int(banana) + 1
total = 0
final = 0
for i in range(n):
	total = total + i * int(intialcost)
if total <= money:
	final = 0
else:
	final = total - int(money)
print(final)


numbers = list(map(int, input().split(' ')))
price = numbers[0]
summa = numbers[1]
count = numbers[2]
coeff = int(count)
for i in range(0, count):
	coeff += i
result = int(coeff * price - summa)
if result >= 0:
	print(result)
else:
	print('0')


(cost_ban, money, num_ban) = map(int, input().split())
cost = 1
for i in range(num_ban + 1):
	cost += cost_ban * i
bor = cost - money - 1
if bor < 0:
	print('0')
else:
	print(bor)


(k, n, w) = map(int, input().split())
k_incrementator = 0
k_list = []
for i in range(w):
	k_incrementator += 1
	new_k = k_incrementator * k
	k_list.append(new_k)
ans = sum(k_list) - n
if ans < 0:
	print(0)
else:
	print(ans)


from random import randint
(k, n, w) = map(int, input().split())
sum = 0
for i in range(1, w + 1):
	sum += i * k
if n >= sum:
	print(0)
else:
	print(sum - n)


l = input()
l = l.strip().split()
for i in range(0, len(l)):
	l[i] = int(l[i])
ar = l[0]
penz = l[1]
akar = l[2]
real_penz = 0
for i in range(1, akar + 1):
	real_penz += ar * i
if real_penz <= penz:
	print(0)
else:
	print(real_penz - penz)


(k, n, w) = map(int, input().split())
i = 1
sum = 0
while True:
	sum += i * k
	i += 1
	if i > w:
		break
if sum > n:
	print(sum - n)
else:
	print('0')


ints = []
for i in input().split(' '):
	ints.append(int(i))
cost = ints[0]
soldierMoney = ints[1]
numWants = ints[2]
moneyOwed = 0
for i in range(1, numWants + 1):
	soldierMoney -= i * cost
if soldierMoney > 0:
	print(0)
else:
	print(abs(soldierMoney))


data = input()
l = []
t = ''
for i in data:
	if i == ' ':
		l.append(t)
		t = ''
	else:
		t += i
l.append(t)
k = l[0]
n = l[1]
w = l[2]
banana = 0
for i in range(int(w) + 1):
	banana += int(k) * i
if banana <= int(n):
	print(0)
else:
	print(banana - int(n))


(cen, deng, kolv) = map(int, input().split())
s = 0
for i in range(kolv):
	s += cen * (i + 1)
if s > deng:
	print(s - deng)
else:
	print(0)


(k, w, n) = map(int, input().split())
sum1 = n * (n + 1) / 2 * k
b = sum1 - w
if b > 0:
	print(int(b))
else:
	print(0)


(K, N, W) = map(int, input().split(' '))
c = 0
while W > 0:
	c = c + K * W
	W -= 1
if c > N:
	print(c - N)
else:
	print(0)


(price, haves, amt) = map(int, input().split())
s = sum([price * i for i in range(1, amt + 1)])
print((s - haves) * (s > haves))


(k, n, w) = map(int, input().split())
amt = k * (w / 2) * (w + 1)
net = amt - n
if net <= 0:
	print('0')
else:
	print(int(net))


array = list(map(int, input().split(' ')))
k = array[0]
n = array[1]
w = array[2]
neededMoney = w / 2 * (k + w * k)
if neededMoney - n < 0:
	print(0)
else:
	print(int(neededMoney - n))


a = [int(x) for x in input().split()]
cost = 0
for i in range(1, a[2] + 1):
	cost = cost + i * a[0]
o = cost - a[1]
if o > 0:
	print(o)
else:
	print('0')


g = input()
g = [int(s) for s in g.split() if s.isdigit()]
cost = 0
for i in range(g[2]):
	cost += (i + 1) * g[0]
if cost - g[1] < 0:
	print(0)
else:
	print(cost - g[1])


(price, money, need) = map(int, input().strip().split(' '))
print(0 if money >= price * sum(range(need + 1)) else price * sum(range(need + 1)) - money)


(k, d, n) = map(int, input().split())
sumn = n * (n + 1) / 2
actualsum = sumn * k
if actualsum > d:
	final = actualsum - d
	print(int(final))
else:
	print('0')


import sys

def sum(a1, an):
	return int((a1 + an) * (an - a1 + 1) / 2)
(k, n, w) = map(int, sys.stdin.readline().split())
print(max(0, sum(1, w) * k - n))


(k, n, w) = map(int, input().split())
y = w * (w + 1) // 2
z = y * k
x = z - n
if x < 0:
	print(0)
else:
	print(x)


s = list(map(int, input().split()))
(p, q, r) = (s[0], s[1], s[2])
a = []
for i in range(1, s[2] + 1):
	m = i * s[0]
	a.append(m)
z = sum(a)
b = z - s[1]
if b <= 0:
	print(0)
else:
	print(b)


(a, b, c) = map(int, input().split(' '))
p = []
for i in range(1, c + 1):
	p.append(a * i)
e = sum(p) - b
if e > 0:
	print(e)
else:
	print(0)


(coast, savings, wish) = map(int, input().split())
need = 0
for i in range(1, wish + 1):
	need = need + coast * i
if need > savings:
	print(need - savings)
elif savings >= need:
	print(0)


k = list(map(int, input().split()))
cost = 0
for i in range(1, k[2] + 1):
	cost += i * k[0]
if k[1] < cost:
	ans = cost - k[1]
	print(ans)
else:
	print('0')


(a, s, d) = map(int, input().split())
sum = 0
for i in range(d + 1):
	sum = sum + i * a
if sum <= s:
	print(0)
else:
	print(sum - s)


(k1, n, w) = map(int, input().split())
f = w * (w + 1) // 2
print(k1 * f - n if k1 * f - n > 0 else 0)


(x, y, z) = input().split()
c = [i for i in range(1, int(z) + 1)]
d = sum(c) * int(x) - int(y)
print(d if d > 0 else 0)


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])
elems = inlt()
k = elems[0]
n = elems[1]
w = elems[2]
i = 1
totPrice = 0
for counter in range(1, w + 1):
	totPrice += i * k
	i = i + 1
alfa = totPrice - n
if alfa <= 0:
	print(0)
else:
	print(alfa)


(expense, currentMoney, bananas) = map(int, input().split())
moneyToBorrow = 0
totalExpense = (bananas ** 2 + bananas) // 2 * expense
moneyToBorrow = totalExpense - currentMoney
if moneyToBorrow < 0:
	moneyToBorrow = 0
print(moneyToBorrow)


given = input().split(' ')
initial = int(given[0])
money = int(given[1])
bananaWant = int(given[2])
n = 1
moneyNeed = 0
bananaCount = 0
while bananaCount < bananaWant:
	moneyNeed = moneyNeed + initial * n
	n += 1
	bananaCount += 1
if moneyNeed > money:
	print(moneyNeed - money)
else:
	print('0')


(k, i, numofb) = [int(x) for x in input().split()]
lll = list()
for a in range(numofb + 1)[1:]:
	lll.append(a * k)
summ = sum(lll)
ans = summ - i
if ans < 1:
	print(0)
else:
	print(ans)


(k, n, w) = list(map(int, input().split()))
cost = k
for i in range(2, w + 1):
	cost += i * k
print(abs(min(n - cost, 0)))


(cost_per_banana, savings, wanted_bananas) = [int(num) for num in input().split(' ')]
total_cost = int(cost_per_banana * (wanted_bananas * (wanted_bananas + 1)) / 2)
if total_cost > savings:
	diff = total_cost - savings
	print(diff)
else:
	print(0)


import sys
(k, n, w) = map(int, sys.stdin.read().split())
cost = k * int(w * (w + 1) / 2)
print(max(0, cost - n))


(cost_for_banana, money_that_have_solider, bananas_to_buy) = map(int, input().split())
total_money_to_buy_bananas = 0
for i in range(1, bananas_to_buy + 1):
	total_money_to_buy_bananas += i * cost_for_banana
if total_money_to_buy_bananas > money_that_have_solider:
	print(total_money_to_buy_bananas - money_that_have_solider)
else:
	print(0)


get = input().split()
first = int(get[0])
money = int(get[1])
num = int(get[2])
i = 0
money_need = 0
while i < num:
	money_need += first * (i + 1)
	i += 1
if money >= money_need:
	print(0)
else:
	print(money_need - money)


(precoInicial, money, numBananas) = [int(x) for x in input().split()]
ans = 0
total = 0
for i in range(1, numBananas + 1):
	total += i * precoInicial
if total < money:
	print(0)
else:
	print(total - money)


(k, n, w) = input().split(' ')
k = int(k)
n = int(n)
w = int(w)
s = sum((b * k for b in range(1, w + 1)))
f = s - n
if f < 0:
	print(0)
else:
	print(f)


def borrowMoney(n, k, w):
	borrow = k * (w * (w + 1)) // 2 - n
	return borrow if borrow > 0 else 0

def main():
	(k, n, w) = input().split()
	print(borrowMoney(int(n), int(k), int(w)))
main()


def test():
	(k, n, w) = map(int, input().split())
	total_cost = 0
	for i in range(1, w + 1):
		total_cost += i * k
	x = max(0, total_cost - n)
	print(x)
	return x
test()


arr = [int(num) for num in input().split()]
a = arr[2] * (arr[2] + 1) // 2
if arr[1] >= arr[0] * a:
	print(0)
else:
	print(arr[0] * a - arr[1])


import math
(k, n, w) = map(int, input().split())
total = 0
for x in range(1, w + 1):
	total += x * k
print(max(0, total - n))


n = input().split(' ')
initial = int(n[0])
ans = 0
for i in range(1, int(n[2]) + 1):
	initial *= i
	ans += initial
	initial = int(n[0])
if ans - int(n[1]) < 0:
	print(0)
else:
	print(ans - int(n[1]))


(first_price, money, num) = [int(i) for i in input().split(' ')]
for i in range(num):
	money -= (i + 1) * first_price
print(abs(money) if money < 0 else 0)


a = input().split()
k = int(a[0])
qian = int(a[1])
n = int(a[2])
x = 0
for i in range(n):
	x = x + (i + 1) * k
if qian < x:
	print(x - qian)
else:
	print(0)


(k, n, w) = [int(e) for e in input().split()]
s = 0
for banana in range(1, w + 1):
	s += banana * k
if s > n:
	print(s - n)
else:
	print(0)


x = input()
y = x.split(' ')
k = int(y[0])
intd = int(y[1])
nb = int(y[2])
total = 0
for i in range(1, nb + 1):
	total = total + k * i
borrow = total - intd
if borrow < 0:
	borrow = 0
print(borrow)


(k, n, w) = map(int, input().split())
sum = i = 0
while w:
	w -= 1
	i += 1
	sum += i * k
print(max(0, sum - n))


g = input()
s = g.split(' ')
t = []
ww = 0
din = 0
for i in s:
	t.append(int(i))
din = t[2]
for i in range(1, din + 1):
	ww += i * t[0]
if t[1] >= ww:
	print(0)
else:
	print(ww - t[1])


(k, n, w) = map(int, input().strip().split())
cost = k * sum(range(1, w + 1))
print(max(0, cost - n))


data = input('')
space1_pos = data.find(' ')
k = int(data[:space1_pos])
data_2 = data[space1_pos + 1:]
space2_pos = data_2.find(' ')
n = int(data_2[:space2_pos])
w = int(data_2[space2_pos + 1:])
i = 1
cost = 0
while i <= w:
	cost = cost + i * k
	i = i + 1
borrow = cost - n
if borrow <= 0:
	print('0')
else:
	print(borrow)


(banana_cost, money_available, banana_quantity) = [int(i) for i in input().split()]
money_needed = int((1 + banana_quantity) / 2 * banana_quantity) * banana_cost
print(money_needed - money_available) if money_needed > money_available else print(0)


z = input().split()
k = int(z[0])
n = int(z[1])
w = int(z[2])
q = n - k * w * (w + 1) // 2
if q < 0:
	print(abs(q))
else:
	print('0')


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
buy = w * (w + 1) * k / 2 - n
if buy > 0:
	print(int(buy))
elif buy <= 0:
	print(0)


def main():
	(k, n, w) = map(int, input().split())
	s1 = w * (w + 1) // 2
	print(max(0, k * s1 - n))
	pass
main()


(k, n, w) = input().split()
count = 0
for i in range(int(w)):
	count += i + 1
rs = count * int(k)
result = rs - int(n)
if result < 0:
	result = 0
print(result)


(k, n, w) = map(int, input().split())
aaa = k * w * (w + 1) / 2 - n
if aaa > 0:
	bbb = aaa
else:
	bbb = 0
print(int(bbb))


s = input()
num = []
num = s.split(' ')
k = int(num[0])
n = int(num[1])
w = int(num[2])
i = 0
sum = i
while i != w + 1:
	sum += i * k
	i += 1
if sum < n or sum == n:
	i = 0
else:
	i = sum - n
print(i)


List = list(map(int, input().split()))
costFirst = List[0]
Money = List[1]
NumBananas = List[2]
CostALL = 0
for i in range(1, NumBananas + 1):
	CostALL += costFirst * i
if CostALL < Money:
	print(0)
else:
	print(CostALL - Money)


(z, zz) = (input, lambda : list(map(int, z().split())))
zzz = lambda : [int(i) for i in stdin.readline().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac
from itertools import permutations as permu

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = True
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
(k, n, m) = zz()
t = 0
for i in range(1, m + 1):
	t += i * k
if t > n:
	print(t - n)
else:
	print(0)


i = input()
l = i.split(' ')
f = []
g = 0
j = 0
for i in l:
	f.append(int(i))
j = f[2]
for i in range(1, j + 1):
	g += i * f[0]
if f[1] >= g:
	print(0)
else:
	print(g - f[1])


a = input()
(k1, n1, w1) = a.split()
k = int(k1)
n = int(n1)
w = int(w1)
sum = int(w / 2 * (2 * k + (w - 1) * k))
b = sum - n
if b <= 0:
	b = 0
print(b)


(x, y, z) = [int(i) for i in input().split()]
totalcost = 0
for i in range(z):
	totalcost = totalcost + x * (i + 1)
if totalcost >= y:
	totalcost = totalcost - y
	print(totalcost)
elif totalcost <= y:
	print('0')


import sys

def solution():
	lines = sys.stdin.readlines()
	for line in lines:
		(k, n, w) = line.split()
		k = int(k)
		n = int(n)
		w = int(w)
		total = 0
		for i in range(1, w + 1):
			total += i * k
		answer = max(total - n, 0)
		print(answer)
solution()


string = input().split(' ')
price = int(string[0])
cash = int(string[1])
bananas_num = int(string[2])
residual = (price + price * bananas_num) * bananas_num / 2 - cash
if residual > 0:
	print(int(residual))
else:
	print(0)


def main():
	arr = input().split()
	arr = [int(x) for x in arr]
	for i in range(arr[2]):
		arr[1] -= (i + 1) * arr[0]
	if arr[1] >= 0:
		print(0)
	else:
		print(arr[1] * -1)
main()


l = list(map(int, input().rstrip().split()))
k = l[0]
n = l[1]
w = l[2]
t = k * (w * (w + 1) // 2)
left = t - n
if left > 0:
	print(left)
else:
	print(0)


inp = input()
lst = inp.split(' ')
price = 0
for i in range(1, int(lst[2]) + 1, 1):
	price += i * int(lst[0])
if int(lst[1]) >= price:
	print('0')
else:
	print(price - int(lst[1]))


(k, n, w) = map(int, input().split())
much = 0
i = 0
while i < w:
	i += 1
	much += i * k
bor = much - n
if bor > 0:
	print(bor)
else:
	print('0')


arr = input().split()
(k, n, w) = (int(arr[0]), int(arr[1]), int(arr[2]))
c = k * w * (w + 1) * 0.5
if n - c > 0:
	print(0)
else:
	print(int(c - n))


inp = input().split()
(k, n, w) = [int(i) for i in inp]
excess = w / 2 * (2 * k + (w - 1) * k) - n
if excess > 0:
	print(int(excess))
else:
	print(0)


import sys
a = [int(i) for i in input().split()]
k = a[0]
n = a[1]
w = a[2]
b = 0
for i in range(1, w + 1):
	b = b + i * k
total = n - b
if total > 0:
	print(0)
else:
	print(abs(total))


def tong(k, w):
	s = 0
	for i in range(1, w + 1):
		s += i * k
	return s
a = list(map(int, input().split()))
b = tong(a[0], a[2])
if b - a[1] < 0:
	print(0)
else:
	print(b - a[1])


d = list(map(int, input().split()))
brr = 0
for i in range(d[2]):
	brr = brr + (i + 1) * d[0]
print(brr - d[1] if brr - d[1] > 0 else 0)


(c, m, n) = list(map(int, input().split()))
f_m = int(c * (n * (n + 1) // 2))
r = f_m - m
if r < 0:
	print('0')
else:
	print(r)


def resolve_problem():
	(firstPrice, dollarTotal, nbBananas) = map(int, input().split())
	price = 0
	for i in range(nbBananas):
		price += (i + 1) * firstPrice
	emprunt = price - dollarTotal
	if emprunt < 0:
		emprunt = 0
	return emprunt
print(resolve_problem())


l = list(map(int, input().split()))
amount = 0
temp = 1
for i in range(l[2]):
	amount = amount + temp * l[0]
	temp = i + 2
ans = amount - l[1]
if ans < 0:
	print('0')
else:
	print(ans)


soldier = input()
a = []
count = 0

def get_the_list(count, limit, a):
	for i in range(0, len(limit)):
		if limit[i] == ' ':
			a.append(int(limit[int(count):int(i)]))
			count = i + 1
		elif i == len(limit) - 1:
			a.append(int(limit[int(count):len(limit)]))
	return a
data = get_the_list(count, soldier, a)
money = 0
counting = 1
while counting <= data[2]:
	money += counting * data[0]
	counting += 1
if data[1] - money < 0:
	print(money - data[1])
else:
	print(0)


(k, n, w) = map(int, input().split())
result = 0
for i in range(1, w + 1):
	result += k * i
if result > n:
	print(result - n)
	quit()
print(0)


d = input()
d = d.split(' ')
k = int(d[0])
n = int(d[1])
w = int(d[2])
s = 0
x = k
for i in range(w):
	s = s + x
	x = x + k
z = s - n
if z < 0:
	print(0)
else:
	print(z)


x = list(map(int, input().strip().split()))
amount = 0
for i in range(x[2]):
	amount += (i + 1) * x[0]
amount -= x[1]
if amount < 0:
	print(0)
else:
	print(amount)


(p, d, n) = input().split()
p = int(p)
d = int(d)
n = int(n)
c = 0
for i in range(1, n + 1):
	c = c + p * i
if c > d:
	print(c - d)
else:
	print(0)


knw = list(map(int, input().split()))
costo = knw[2] * (knw[2] + 1) // 2 * knw[0]
prestamo = knw[1] - costo
if prestamo < 0:
	print(abs(prestamo))
else:
	print(0)


import sys
wtf = sys.stdin.read()
wtf = wtf.split('\n')[0]
wtfs = wtf.split(' ')
a1 = int(wtfs[0])
d = a1
s = int(wtfs[1])
n = int(wtfs[2])
an = a1 + (n - 1) * d
sum = int(n * (a1 + an) / 2)
ans = 0
if sum > s:
	ans = sum - s
print(ans)


a = input()
(k, n, w) = a.split()
k = int(k)
n = int(n)
w = int(w)
i = 1
money = 0
while i <= w:
	money_1 = i * k
	i += 1
	money = money + money_1
borc = n - money
if borc < 0:
	print(borc * -1)
else:
	print(0)


(cost, money, req) = map(int, input().split())
total = cost * int(req * (req + 1) / 2)
if money > total:
	print(0)
else:
	print(abs(money - total))


Line = input().split()
K = int(Line[0])
N = int(Line[1])
W = int(Line[2])
result = 0
for i in range(1, W + 1, 1):
	result += K * i
if result <= N:
	print(0)
else:
	print(result - N)


(k, n, w) = map(int, input().split())
bill = 0
for i in range(1, w + 1):
	bill = bill + i * k
money_left = n - bill
if money_left > 0:
	print('0')
else:
	print(0 - int(money_left))


lit = list(map(int, input().strip().split()))
doll = 0
for i in range(1, lit[2] + 1):
	doll += lit[0] * i
if lit[1] - doll < 0:
	print(abs(lit[1] - doll))
else:
	print(0)


(s, n, p) = map(int, input().split())
print(max(p * (p + 1) * s // 2 - n, 0))


ch = input()
l = ch.split()
s = 0
for i in range(int(l[2]) + 1):
	s = s + int(l[0]) * i
if int(l[1]) - s > 0:
	print(0)
else:
	print(s - int(l[1]))


(k, n, w) = [int(i) for i in input().split()]
price = 0
for i in range(1, w + 1):
	price = price + i * k
borrow = price - n
if borrow <= 0:
	borrow = 0
print(borrow)


(k, n, w) = map(int, input().rstrip().split())
x = w * (w + 1) // 2
cost = x * k
ans = cost - n
if cost < n:
	print('0')
else:
	print(ans)


inputLine = input()
inputList = inputLine.split(' ')
k = int(inputList[0])
n = int(inputList[1])
w = int(inputList[2])
cost = 0
i = 1
while i <= w:
	cost = cost + i * k
	i = i + 1
if cost > n:
	print(cost - n)
else:
	print('0')


(k, n, w) = map(int, input().split())
dengi = 0
uvel = 1
for i in range(0, w):
	dengi = dengi + uvel * k
	uvel += 1
if dengi - n >= 0:
	print(dengi - n)
else:
	print(0)


(price, cost_of_first_banana, number_of_banana) = map(int, input().split())
number_of_banana = number_of_banana * (number_of_banana + 1) / 2
borrow_money = price * number_of_banana - cost_of_first_banana
if borrow_money <= 0:
	print('0')
else:
	print(int(borrow_money))


import os
import sys
(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
ans = int(0)
for x in range(0, c):
	ans += (x + 1) * a
ans -= b
if ans < 1:
	print(0)
else:
	print(ans)


(n, a, w) = map(int, input().split())
c = 0
for i in range(1, w + 1):
	c = c + n * i
s = c - a
if s > 0:
	print(s)
else:
	print(0)


x = input('').split()
k = x[0]
n = x[1]
w = x[2]
total = 0
inc = 0
for i in range(int(w)):
	price = 0
	inc += 1
	price += inc * int(k)
	total += price
diff = total - int(n)
if diff < 0:
	diff = 0
else:
	diff = diff
print(diff)


(a, n, k) = map(int, input().strip().split())
an = a + (k - 1) * a
sum = int(k * (a + an) / 2)
if sum <= n:
	print(0)
else:
	print(sum - n)


inputs = input().split()
inputs = [int(x) for x in inputs]
totalCost = 0
for i in range(1, inputs[2] + 1):
	totalCost += i
totalCost *= inputs[0]
print(totalCost - inputs[1]) if totalCost - inputs[1] > 0 else print('0')


(s, c, n) = input().split()
salery = int(s)
cash1 = int(c)
cash2 = 0
number = int(n)
for i in range(number):
	cash2 = (i + 1) * salery + cash2
if cash2 - cash1 > 0:
	print(cash2 - cash1)
else:
	print(0)


inputNumbers = input().split(' ')
k = int(inputNumbers[0])
n = int(inputNumbers[1])
w = int(inputNumbers[2])
totalCost = 0
for i in range(w):
	totalCost = totalCost + k * (i + 1)
if totalCost < n:
	print(0)
else:
	print(abs(n - totalCost))


lst = [int(i) for i in input().split()]

def total_cost(w, k):
	total = k * w * ((w + 1) / 2)
	return total
loan = int(total_cost(lst[2], lst[0]) - lst[1])
if loan < 0:
	print(0)
else:
	print(loan)


(cost, bank, count) = map(int, input().split())
res = (1 + count) / 2 * count * cost - bank
if res > 0:
	print(int(res))
else:
	print(0)


(k, n, w) = map(int, input().split())
total = 0
for i in range(1, w + 1):
	total += i * k
ans = abs(min([0, n - total]))
print(ans)


[k, n, w] = list(map(int, input().split()))
summ = 0
for i in range(1, w + 1):
	summ += i * k
debt = 0
if summ > n:
	debt = summ - n
print(debt)


import math

def main():
	(k, n, w) = [int(i) for i in input().split(' ')]
	total_price = sum(range(1, w + 1)) * k
	print(total_price - n) if n < total_price else print(0)
main()


(price, hasM, banans) = map(int, input().split())
m = 0
for i in range(1, banans + 1):
	m += price * i
print(m - hasM if m - hasM > 0 else 0)


(k, dlrs, buy) = map(int, input().split())
for n in range(1, buy + 1):
	dlrs -= n * k
print(abs(min(0, dlrs)))


def main():
	(cost_banana, initial_dollars, total_bananas) = map(int, input().split())
	total_cost = 0
	for i in range(1, total_bananas + 1):
		total_cost += cost_banana * i
	if initial_dollars >= total_cost:
		print(0)
	else:
		print(total_cost - initial_dollars)
main()


list = [int(x) for x in input().split()]
k = list[0]
n = list[1]
w = list[2]
times = w * (w + 1) / 2
money = times * k
lack = 0
if money <= n:
	lack = 0
else:
	lack = money - n
print(int(lack))


string = input()
numbers = string.split(' ')
k = int(numbers[0])
n = int(numbers[1])
w = int(numbers[2])
dollars = int(k * w * (w + 1) / 2)
if dollars > n:
	print(dollars - n)
else:
	print(0)


import sys
(k, n, w) = map(int, input().split(' '))
cost = k
for i in range(2, w + 1):
	cost = cost + i * k
if cost < n:
	print(0)
else:
	print(cost - n)


n = input()
p = n.index(' ')
q = n.rfind(' ')
m = n[0:p]
l = n[p + 1:q]
q = n[q + 1:]
s = 0
for i in range(1, int(q) + 1):
	s = s + i * int(m)
if s > int(l):
	s = s - int(l)
	print(s)
else:
	print('0')


(costInitial, moneyInitial, bananaNum) = map(int, input().split())
totalCost = costInitial * (bananaNum * (bananaNum + 1) / 2)
if totalCost > moneyInitial:
	print(int(totalCost - moneyInitial))
else:
	print(0)


x = input().split()
x = [int(j) for j in x]
sol = x[2] * (x[2] + 1) / 2 * x[0]
if sol <= x[1]:
	print(0)
else:
	print(int(sol - x[1]))


a = []
for x in input().split():
	a.append(int(x))
ans = 0
for i in range(1, a[2] + 1):
	ans += i * a[0]
ans -= a[1]
if ans <= 0:
	ans = 0
print(ans)


(a, b, c) = tuple(map(int, input().split(' ')))
r = a * c * (c + 1) // 2 - b
if r < 0:
	print(0)
else:
	print(r)


(k, n, w) = map(int, input().split())
p = w * (w + 1) / 2
t = k * p
l = int(t)
d = 0
if l - n > 0:
	print(l - n)
else:
	print(d)


a = input()
(k, n, w) = [int(a) for a in a.split()]
suma = 0
i = 0
while i != w + 1:
	suma += k * i
	i += 1
pin = n - suma
if pin >= 0:
	print('0')
else:
	print(-pin)


from sys import stdin, stdout

def get_ints():
	return map(int, stdin.readline().strip().split())
(k, n, w) = get_ints()
cost = 0
for i in range(1, w + 1):
	cost += i * k
if cost - n < 0:
	stdout.write('0')
else:
	stdout.write(str(cost - n))


import sys
(k, n, w) = map(int, sys.stdin.readline().strip().split())
t = int((w + 1) / 2 * (w * k)) - n
if t < 0:
	print(0)
else:
	print(t)


u = input()
h = u.split(' ')
l = []
n = 0
mel = 0
for j in h:
	l.append(int(j))
mel = l[2]
for j in range(1, mel + 1):
	n += j * l[0]
if l[1] >= n:
	print(0)
else:
	print(n - l[1])


(cost, dollors, wants) = map(int, input().split())
sum = 0
for i in range(1, wants + 1):
	sum += cost * i
if dollors - sum > 0:
	print('0')
else:
	print(sum - dollors)


(n, k, w) = map(int, input().split())
(b, flag) = (0, True)
for i in range(w):
	if flag:
		k -= (i + 1) * n
		if k < 0:
			flag = False
			b = k
	else:
		b -= (i + 1) * n
print(abs(b))


(each, tk, num) = map(int, input().split())
bill = 0
i = 1
while i <= num:
	bill = bill + each * i
	i = i + 1
rent = bill - tk
if rent < 0:
	print('0')
else:
	print(rent)


(price, money, number) = input().split()
price = int(price)
money = int(money)
number = int(number)
total = price * (number * (number + 1) // 2)
if total <= money:
	print(0)
else:
	print(total - money)


nums = input('')
(k, n, w) = nums.split(' ')
(k, n, w) = (int(k), int(n), int(w))
total_price = 0
for i in range(1, w + 1):
	total_price += k * i
if total_price > n:
	result = total_price - n
	print(result)
else:
	print('0')


(k, n, w) = list(map(int, input().split()))
byed = 0
while byed < w:
	cost = k * (byed + 1)
	n = n - cost
	byed += 1
if n < 0:
	print(abs(n))
else:
	print(0)


(k, n, w) = tuple(map(int, input().split()))
l = []
for i in range(1, w + 1):
	l.append(i * k)
x = sum(l)
if n >= x:
	print('0')
else:
	print(x - n)


import sys
n = []
for apa in sys.stdin:
	n.append(apa)
	if apa == '\n':
		break
string = ' '.join(n).replace('\n', '')
lst = string.split()
k = int(lst[0])
n = int(lst[1])
w = int(lst[2])
total = 0
for i in range(1, w + 1):
	total = total + i * k
if total > n:
	print(total - n)
else:
	print(0)


(x, y, z) = map(int, input().split())
a = []
for i in range(z + 1):
	w = i * x
	a.append(w)
sum_ = sum(a)
if sum_ > y:
	print(sum_ - y)
else:
	print('0')


a = input().strip().split()
b = [int(i) for i in a]
nu = 1
total_cost = 0
for i in range(b[2]):
	total_cost += nu * b[0]
	nu += 1
if b[1] > total_cost:
	print(0)
else:
	print(total_cost - b[1])


(p, m, b) = map(int, input().split())
borr = int(b / 2 * (2 * p + (b - 1) * p) - m)
if borr > 0:
	print(borr)
else:
	print(0)


k = input()
w = k.split(' ')
a = []
vb = 0
ban = 0
for i in w:
	a.append(int(i))
ban = a[2]
for i in range(1, ban + 1):
	vb += i * a[0]
if a[1] >= vb:
	print(0)
else:
	print(vb - a[1])


arr = list(map(int, input().split()))
count = 1
lst = []
for i in range(1, arr[2] + 1):
	cost = arr[0] * i
	lst.append(cost)
if sum(lst) - arr[1] < 0:
	print('0')
else:
	print(sum(lst) - arr[1])


(h, n, w) = map(int, input().split())
res = 0
for i in range(1, w + 1):
	res = res + h * i
g = n - res
if g < 0:
	print(abs(g))
else:
	print('0')


from sys import stdin

def readInts():
	return map(int, stdin.readline().strip().split())

def solve(k, n, w):
	w2 = w
	x = 1
	while w2 > 0:
		n -= x * k
		x += 1
		w2 -= 1
	return max(0, -n)

def run():
	(k, n, w) = readInts()
	print(solve(k, n, w))
run()


row = str(input()).split(' ')
c = int(row[0])
m = int(row[1])
w = int(row[2])
b = 0
cost = 0
for i in range(1, w + 1):
	cost += i * c
cost -= m
if cost > 0:
	print(cost)
else:
	print(0)


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
Sum = 0
q = 0
for i in range(1, w + 1):
	Sum += k * i
if Sum <= n:
	q = 0
else:
	q = Sum - n
print(q)


(k, n, w) = [int(x) for x in input().split()]
add = k * 0.5 * w * (w + 1)
dif = n - add
print(int(abs(dif - abs(dif)) / 2))


(a, b, c) = tuple(map(int, input().split()))
count = 1
sum = 0
while count <= c:
	sum += a * count
	count += 1
if b >= sum:
	print(0)
else:
	print(sum - b)


import math
arr = input().split()
k = int(arr[0])
n = int(arr[1])
w = int(arr[2])
if w * (w + 1) / 2 * k > n:
	print(int(w * (w + 1) / 2 * k - n))
else:
	print(0)


aa = input()
a = aa.split()
kk = a[0]
k = int(kk)
nn = a[1]
n = int(nn)
ww = a[2]
w = int(ww)
p = 0
sum = 0
if k >= 1 or w <= 1000 or p >= 0 or (p <= 10 ** 9):
	while p <= w:
		sum = sum + p * k
		p = p + 1
	res = sum - n
	if res < 0:
		print(0)
	else:
		print(res)


(k, n, w) = map(int, input().split())
a = []
for i in range(1, w + 1):
	a.append(i)
sum = sum(a)
total = k * sum
if n < total:
	borrow_value = total - n
	print(borrow_value)
else:
	print('0')


(fist_banana_price, solders_money, total_bananas) = map(lambda x: int(x), input().split())
x = sum(list(range(total_bananas + 1)))
if solders_money <= fist_banana_price * x:
	print(fist_banana_price * x - solders_money)
else:
	print(0)


n = input()
n = n.split()
(n[0], n[1], n[2]) = (int(n[0]), int(n[1]), int(n[2]))
mo = 0
for i in range(n[2]):
	mo += (i + 1) * n[0]
j = mo - n[1]
if j < 0:
	j = 0
print(j)


inp = input().split()
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
sum = 0
for i in range(w + 1):
	sum += i * k
res = n - sum
if res >= 0:
	print(0)
else:
	print(res * -1)


a = [int(x) for x in input().split()]
b = 0
for i in range(1, a[2] + 1):
	b += a[0] * i
if a[1] == 0:
	print(b)
elif a[1] > b:
	print(0)
else:
	print(b - a[1])


li = [int(x) for x in input().split()]
ans = int(li[2] * (li[2] + 1) / 2) * li[0] - li[1]
if ans > 0:
	print(ans)
else:
	print(0)


import math
(priceBanana, startMoney, numBanana) = input().split()
priceBanana = int(priceBanana)
startMoney = int(startMoney)
numBanana = int(numBanana)
priceToPay = 0
i = 1
while i < numBanana + 1:
	priceBananaI = i * priceBanana
	priceToPay = priceToPay + priceBananaI
	i += 1
moneyNeeded = priceToPay - startMoney
if moneyNeeded > 0:
	print(moneyNeeded)
else:
	print(0)


(k, n, w) = map(int, input().split())
f = []
c = 0
for i in range(w):
	c += k
	f.append(c)
if sum(f) > n:
	print(sum(f) - n)
else:
	print('0')


(k, m, w) = map(int, input().split())
s = 0
for i in range(1, w + 1):
	s = s + i * k
if s <= m:
	print('0')
else:
	print(s - m)


temp = list(map(int, input().split()))
coin = int(0)
for i in range(1, temp[2] + 1):
	coin += temp[0] * i
if coin - temp[1] < 0:
	print(int(0))
else:
	print(coin - temp[1])


q = list(map(int, input().split()))
k = q[0]
n = q[1]
w = q[2]
p = k * (w * (w + 1) // 2)
if n >= p:
	print('0')
else:
	print(p - n)


(c, m, n) = map(int, input().split(' '))
sum = 0
for i in range(1, n + 1):
	sum = sum + i * c
l = sum - m
if l < 0:
	print(0)
else:
	print(l)


(banana_cost, balance, bananas) = map(int, input().split())
toborrow = 0
for i in range(1, bananas + 1):
	toborrow += i
toborrow = toborrow * banana_cost - balance
if toborrow < 0:
	print(0)
else:
	print(toborrow)


(price, dollar, n) = list(map(int, input().split()))
tot = price * (n * (n + 1) // 2)
if tot < dollar:
	print(0)
else:
	print(tot - dollar)


def main():
	(k, n, w) = map(int, input('').split())
	l = map(lambda kr: mul(kr, k), range(w + 1))
	r = sum(l) - n
	print(r if r > 0 else 0)

def mul(n, k):
	return n * k
main()


a = [int(n) for n in input().split()]
print(max(0, int(a[2] * (a[2] + 1) / 2 * a[0] - a[1])))


from collections import deque
from math import ceil, floor, sqrt, gcd

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def si():
	return input()
(k, n, w) = mi()
s = w * (w + 1) // 2
s *= k
if n >= s:
	print('0')
else:
	print(s - n)


N = list(map(int, input().split()))
fb_cost = N[0]
money = N[1]
n_bananas = N[2]
total = 0
for i in range(1, n_bananas + 1):
	total += fb_cost * i
if total < money:
	print(0)
else:
	print(total - money)


import sys
inp = sys.stdin.readline().split()
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
pa = w * w + w
pa = pa / 2
c = k * pa
b = c - n
if b > 0:
	print(int(b))
else:
	print(0)


n = input().split(' ')
j = 1
s = 0
for i in range(int(n[2])):
	s = s + int(n[0]) * j
	j += 1
if s > int(n[1]):
	print(s - int(n[1]))
else:
	print(0)


(h, k, w) = map(int, input().split())
ans = h * (w * (w + 1) // 2) - k
if ans > 0:
	print(ans)
else:
	print(0)


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
res2 = 0
sube = 1
while w != 0:
	multi = 0
	multi = k * sube
	res2 += multi
	sube += 1
	w -= 1
res2 -= n
if res2 <= 0:
	res2 = 0
print(res2)


def borrow(k, n, w):
	sum = 0
	for i in range(w):
		sum = sum + (i + 1) * k
	if sum <= n:
		return 0
	else:
		return sum - n
str = input()
list1 = str.split(' ')
k = int(list1[0])
n = int(list1[1])
w = int(list1[2])
print(borrow(k, n, w))


(k, n, w) = map(int, input().split())

def fib(x):
	y = 0
	for i in range(1, x + 1):
		y = y + i
	return y
if fib(w) * k > n:
	print(str(fib(w) * k - n))
else:
	print('0')


[k, w, n] = [int(x) for x in input().split()]
r = k * n * (n + 1) // 2
b = r - w
if b > 0:
	print(b)
else:
	print(0)


(k, n, w) = map(int, input().split())
yaojia = 0
he = 0
for i in range(w):
	yaojia += 1
	he += yaojia * k
if n >= he:
	print(0)
else:
	print(he - n)


(k, n, w) = map(int, input().split())
res = 0
prob = 0
while prob < w:
	prob += 1
	res += k * prob
if res < n:
	print(0)
else:
	print(res - n)


(firstValue, solMoney, banana) = input().split()
sum = 0
for i in range(1, int(banana) + 1):
	sum = sum + int(firstValue) * i
borrow = sum - int(solMoney)
if borrow <= 0:
	print('0')
else:
	print(borrow)


b = [int(s) for s in input().split()]
s_m = b[1]
n = b[2]
b_m = (1 + n) * n * 0.5 * b[0] - s_m
if b_m > 0:
	print(int(b_m))
else:
	print('0')


(in_cost, dollars, bananas) = [int(i) for i in input().split()]
cost = in_cost
total_cost = 0
for i in range(int(bananas)):
	banana_cost = in_cost + i * in_cost
	total_cost += banana_cost
if total_cost - dollars < 0:
	print(0)
else:
	print(total_cost - dollars)


(init, tot, num) = list(map(int, input().split()))
ans = int(num * (num + 1) / 2 * init) - tot
if ans >= 0:
	print(ans)
else:
	print(0)


(Percost, Curmoney, numBanana) = map(int, input().split())
totalCost = Percost * (1 + numBanana) * numBanana / 2
if totalCost > Curmoney:
	print(int(totalCost - Curmoney))
else:
	print(0)


lst = input().split()
k = int(lst[0])
n = int(lst[1])
w = int(lst[2])
i = 1
total = 0
while i <= w:
	total += i * k
	i += 1
loan = total - n
if loan > 0:
	print(loan)
else:
	print('0')


(c, d, b) = map(int, input().split())
total = 0
for i in range(1, b + 1):
	total += i * c
borrow = total - d
if borrow < 0:
	print(0)
else:
	print(borrow)


(k, n, w) = [int(x) for x in input().split()]
num = (1 + w) * w / 2
cost = num * k
need = cost - n
if need > 0:
	print(int(need))
elif need <= 0:
	print('0')


a = [int(elem) for elem in input().split()]
price = int(a[0] * a[2] * ((1 + a[2]) / 2))
if price > a[1]:
	print(price - a[1])
else:
	print(0)


(first_banana, money, amount) = map(int, input().split())
cash = amount * (amount + 1) * first_banana // 2
print(max(cash - money, 0))


from math import pi, gcd, factorial
from collections import defaultdict, Counter
from heapq import heapify, heappop, heappush
from sys import maxsize
mod1 = 10 ** (-9)
mod1 = 10 ** 9 + 7

def input_t():
	return int(input())

def input_f():
	return float(input())

def input_list():
	return [int(num) for num in input().split()]

def print_c(i, res):
	print('Case {}: {}'.format(i + 1, res))

def print_e(i, res):
	print('Case {} = {}'.format(i + 1, res))

def max_min():
	return (maxsize, -maxsize - 1)

def tar(a, b, c):
	if a == b == c == 0:
		exit()

def solve():
	(k, w, n) = input_list()
	s = (n * n + n) // 2
	print(max(0, k * s - w))
solve()


def ceil(n):
	if int(n) == n:
		return n
	else:
		return int(n) + 1
inp = list(map(int, input().split()))
k = inp[0]
n = inp[1]
w = inp[2]
cost = k * w * (w + 1) / 2
cost = ceil(cost)
if cost > n:
	print(int(cost - n))
else:
	print(0)


x = list(map(int, input().rstrip().split()))
y = x[2] + 1
number = 0
for i in range(y):
	number += i * x[0]
number -= x[1]
if number <= 0:
	number = 0
print(number)


a = input().split()
k = int(a[0])
n = int(a[1])
w = int(a[2])
l = 0
for f in range(1, w + 1):
	l = l + f * k
if l > n:
	print(l - n)
else:
	print(0)


def string_list_to_int(string_list):
	int_list = []
	for i in range(0, len(string_list)):
		int_list.append(int(string_list[i]))
	return int_list
banana_data = input()
line = banana_data.split()
line = string_list_to_int(line)
banana_price = line[0]
soldier_dollars = line[1]
amount_of_bananas = line[2]
over_all_banana_price = 0
for i in range(0, amount_of_bananas + 1):
	banana_dollar_price = banana_price * i
	over_all_banana_price = over_all_banana_price + banana_dollar_price
if soldier_dollars < over_all_banana_price:
	result = over_all_banana_price - soldier_dollars
else:
	result = 0
print(result)


def solve():
	(cost_of_the_first_banana, number_of_dollars_has, number_of_bananas_wants) = map(int, input().split())
	sum_dollars_to_buy = 0
	for i in range(number_of_bananas_wants):
		sum_dollars_to_buy += (i + 1) * cost_of_the_first_banana
	if number_of_dollars_has >= sum_dollars_to_buy:
		print(0)
	else:
		print(sum_dollars_to_buy - number_of_dollars_has)
solve()


(s, d, n) = map(int, input().split())
u = s
r = 0
while d > s and n != 0:
	d -= s
	s += u
	n -= 1
if n - 1 >= 0:
	r = s - d
	while n - 1 != 0:
		n -= 1
		s += u
		r += s
	print(r)
else:
	print(r)


(cost_ban1, money, lot) = map(int, input().split())
price = 0
for i in range(1, lot + 1):
	cost_ban = cost_ban1 * i
	price += cost_ban
if price > money:
	print(price - money)
else:
	print('0')


(var1, var2, var3) = map(int, input().split(' '))
if var3 != 0:
	x = 0
	for i in range(1, var3 + 1):
		x = x + var1 * i
	v = x - var2
	if v > 0:
		print(v)
	else:
		print(0)
else:
	print(0)


(k, n, w) = input().split()

def posledsum(x):
	m = 0
	for i in range(1, x + 1):
		m += i
	return m
price = int(k) * posledsum(int(w)) - int(n)
if price > 0:
	print(str(price))
else:
	print(0)


(k, n, w) = map(int, input().split())
S = 0
i = 1
while i <= w:
	S = S + k * i
	i = i + 1
r = n - S
if r >= 0:
	print(0)
else:
	print(S - n)


(k, n, w) = map(int, input().split())
S = 0
for i in range(0, w + 1):
	S += i * k
if n >= S:
	print(0)
elif n < S:
	print(S - n)


(k1, n1, w1) = input().split()
k = int(k1)
n = int(n1)
m = n
w = int(w1)
mused = 0
count = 1
p = 0
i = w
while i > 0:
	mused = count * k
	n = n - mused
	i = i - 1
	count = count + 1
if n < 0:
	print(-1 * n)
else:
	print('0')


def calculate(k, n, w):
	return int(k * w * (w + 1) / 2 - n)
(k, n, w) = input().rstrip().split()
result = calculate(int(k), int(n), int(w))
print(result if result > 0 else 0)


class Solution:

	def __init__(self, data):
		print(data)

	def func(self):
		pass
m = list(map(int, input().split(' ')))
k = m[0]
n = m[1]
w = m[2]
price = 0
for i in range(1, w + 1):
	price += i * k
need = price - n
if need <= 0:
	print(0)
else:
	print(need)


(m, s, k) = list(map(int, input().split()))
if m * k * (k + 1) / 2 - s > 0:
	print(m * k * (k + 1) // 2 - s)
else:
	print(0)


data = input()
dims = data.split(' ')
k = int(dims[0])
n = int(dims[1])
w = int(dims[2])
temp = 0
for i in range(1, w + 1):
	temp = temp + i * k
print(max(temp - n, 0))


while True:
	(k, n, w) = map(int, input().split(' '))
	if n in range(0, 10 ** 9 + 1) and k in range(1, 1001) and (w in range(1, 1001)):
		break
s = 0
for i in range(1, w + 1):
	s += i * k
if s - n < 0:
	print(0)
else:
	print(s - n)


arr = [int(i) for i in input().split()]
last = arr[0] + (arr[2] - 1) * arr[0]
tot = arr[2] / 2 * (arr[0] + last)
if tot > arr[1]:
	bor = tot - arr[1]
else:
	bor = 0
print(int(bor))


a = input().split(' ')
w = int(a[0])
h = int(a[1])
v = int(a[2])
r = 0
for i in range(1, v + 1):
	r = r + w * i
h = h - r
if h < 0:
	print(abs(h))
else:
	print(0)


(stoim, deneg, kolvo) = map(int, input().split())
value = 0
for i in range(1, kolvo + 1):
	value += stoim * i
if value >= deneg:
	print(value - deneg)
else:
	print(0)


(k, n, w) = input().split()
j = 0
for i in range(1, int(w) + 1):
	x = i * int(k)
	j = j + x
y = j - int(n)
if y > 0:
	print(y)
else:
	print(0)


(first_banana, money, banana_count) = map(int, input().split())
result = int((first_banana + first_banana * banana_count) * banana_count / 2)
b = result - money
print(b if b > 0 else 0)


def soldierAndBanana(cost, money, bananas):
	b = int(cost * (bananas * (bananas + 1) / 2) - money)
	if b > 0:
		return b
	else:
		return 0
a = list(map(int, input().split()))
print(soldierAndBanana(a[0], a[1], a[2]))


def SoldiersAndBananas(l):
	sum = 0
	for i in range(1, l[2] + 1):
		sum = sum + i * l[0]
	if sum > l[1]:
		return sum - l[1]
	else:
		return 0
l = [int(n) for n in input().split()]
print(SoldiersAndBananas(l))


array = input().split()
k = int(array[0])
n = int(array[1])
w = int(array[2])
money = int(k * w * (w + 1) / 2 - n)
if money > 0:
	print(money)
else:
	print('0')


(k, n, w) = tuple(map(int, input().split()))
amount = int(k / 2 * (w ** 2 + w))
if n > amount:
	print(0)
else:
	print(amount - n)


lst = [int(i) for i in input().split()]
(k, n, w) = (lst[0], lst[1], lst[2])
w = int(w * (w + 1) / 2)
w *= k
w -= n
if w < 0:
	w = 0
print(w)


def main():
	tokens = input().split()
	(k, n, w) = (int(tokens[0]), int(tokens[1]), int(tokens[2]))
	total_price = sum([i * k for i in range(1, w + 1)])
	missing_money = total_price - n if total_price > n else 0
	print(missing_money)
main()


(first_price, initial_amount, quantity) = map(int, input().split())
cost = 0
for i in range(1, quantity + 1):
	cost += first_price * i
borrow = cost - initial_amount
if borrow > 0:
	print(borrow)
else:
	print(0)


import math
(k, n, w) = list(map(int, input().split(' ')))
moneyReq = k * w * (w + 1) / 2
print(max(0, int(moneyReq - n)))


a = input().split()
b = 0
k = 0
for i in range(int(a[2])):
	b = b + int(a[0])
	k += b
if k < int(a[1]):
	print(0)
else:
	print(k - int(a[1]))


input_arr = [int(i) for i in input().split()]
k = input_arr[0]
n = input_arr[1]
w = input_arr[2]
S = k * w * (w + 1) // 2
ans = S - n if S > n else 0
print(ans)


(price, money, bananasToBuy) = [int(x) for x in input().split(' ')]
totalPrice = sum([price * x for x in range(1, bananasToBuy + 1)])
if totalPrice < money:
	print(0)
else:
	print(abs(money - totalPrice))


(c, h, w) = input().split()
(c, h, w) = (int(c), int(h), int(w))
total = 0
for i in range(1, w + 1):
	total += c * i
if total >= h:
	print(total - h)
else:
	print(0)


(k, n, w) = map(int, input().split(' '))
i = 2
Price = k
while i <= w:
	Price = Price + i * k
	i = i + 1
if Price < n:
	print('0')
else:
	print(Price - n)


(cena, rozpocet, pocet) = map(int, input().split())
celkova_cena = (pocet + 1) / 2 * pocet * cena
pozicat = celkova_cena - rozpocet
if pozicat < 0:
	print(0)
else:
	print(int(pozicat))


try:
	(n, p, q) = map(int, input().split())
	v = q * (q + 1) // 2
	v = n * v
	if v - p < 0:
		print(0)
	else:
		print(v - p)
except:
	pass


(a, b, n) = map(int, input().split())
i = 1
count = 0
for i in range(n + 1):
	x = i * a
	count += x
if count <= b:
	print(0)
else:
	print(count - b)


(x, y, z) = map(int, input().split())
m = x
for i in range(2, z + 1):
	m += x * i
if y > m:
	print(0)
else:
	print(abs(y - m))


line = input()
(K, N, W) = line.split()
k = int(K)
n = int(N)
w = int(W)
m = 0
for i in range(1, w + 1, 1):
	m = m + i * k
print(max(m - n, 0))


(k, n, w) = [int(i) for i in input().split()]
y = sum(list(range(1, w + 1))) * k - n
if y < 0:
	y = 0
print(y)


def cn(v):
	(k, s, n) = v
	h = k * n * (n + 1) // 2 - s
	return h if h > 0 else 0
print(cn([int(x) for x in input().split()]))


def A546():
	(k, n, w) = map(int, input().split())
	count = (1 + w) * w * k * 0.5
	if count > n:
		print(int(count - n))
	else:
		print(0)
A546()


(s, n, w) = [int(string) for string in input().split()]
need = int((2 * s + s * (w - 1)) / 2 * w)
print(need - n if need > n else 0)


(k, n, m) = map(int, input().split())
a = m * (m + 1) // 2
b = k * a
c = b - n
if c >= 0:
	print(c)
else:
	print(0)


(c, d, n) = map(int, input().split())
print(sum(range(n + 1)) * c - d if sum(range(n + 1)) * c - d > 0 else 0)


(price, money, n) = map(int, input().split())
total = 0
for i in range(1, n + 1):
	total += i * price
if money > total:
	print(0)
else:
	print(total - money)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
i = 1
total = 0
while i <= w:
	g = k * i
	total = g + total
	i = i + 1
borrow = total - n
if borrow <= 0:
	print(0)
else:
	print(borrow)


a = list(map(int, input().split()))
print(max(0, a[2] * (a[2] + 1) // 2 * a[0] - a[1]))


from sys import stdin

def main():
	(k, n, w) = map(int, stdin.readline().rstrip().split())
	money = w * (w + 1) // 2 * k
	if n > money:
		print(0)
	else:
		print(money - n)
main()


import math
(k, n, w) = map(int, input().split())
c = []
for i in range(1, w + 1):
	c.append(i * k)
if sum(c) == n:
	print('0')
else:
	k = sum(c) - n
	if k > 0:
		print(sum(c) - n)
	else:
		print('0')


def price():
	(k, n, w) = map(int, input().split())
	cost = int(w * (w + 1) / 2 * k)
	if cost - n > 0:
		print(cost - n)
	else:
		print('0')
price()


def soldiersAndBananas(k, n, w):
	a = w * (w + 1) * (1 / 2) * k - n
	if a > 0:
		return int(a)
	return 0
dataList = [int(x) for x in input().split()]
print(soldiersAndBananas(dataList[0], dataList[1], dataList[2]))


(a, b, c) = map(int, input().split())
c1 = c * (c + 1) // 2
a1 = a * c1
if a1 < b:
	print('0')
else:
	print(a1 - b)


n = input().split()
e = int(n[0]) * ((int(n[2]) + 1) * int(n[2]) / 2) - int(n[1])
if e >= 0:
	print(int(e))
else:
	print('0')


(k, n, m) = map(int, input().split())
(res, temp, ans) = (0, 0, 0)
temp = int(m * (m + 1) // 2) * k
if temp - n > 0:
	print(temp - n)
else:
	print(0)


a = list((int(x) for x in input().strip().split()))[:3]
d = 0
for i in range(1, a[2] + 1):
	d = d + a[0] * i
b = d - a[1]
if b > 0:
	print(b)
else:
	print(0)


data = input().split()
price = int(data[0])
money = int(data[1])
amount = int(data[2])
cost = price * amount * (amount + 1) / 2
if money >= cost:
	print('0')
else:
	borrow = cost - money
	print(int(borrow))


def main():
	(initial_cost, dollars, count_bananas) = [int(x) for x in input().split(' ')]
	solution = int(initial_cost * count_bananas * (count_bananas + 1) / 2 - dollars)
	print(0 if solution < 0 else solution)
main()


(cost, money, quantity) = tuple(map(int, input().split()))
required = cost * quantity * (quantity + 1) // 2
borrow = required - money
if borrow > 0:
	print(borrow)
else:
	print(0)


(first_banana, start_money, banana_need) = list(map(int, input().split()))
money_needed = 0
for i in range(1, banana_need + 1):
	money_needed += first_banana * i
	loan = money_needed - start_money
print(loan if loan >= 1 else 0)


nums = input()
nums = nums.split(' ')
for i in range(len(nums)):
	nums[i] = int(nums[i])
k = nums[0]
n = nums[1]
w = nums[2]
cost = k * (w * (w + 1) / 2)
needed = cost - n
if needed <= 0:
	print(0)
else:
	print(int(needed))


(unit_price, total_money, target_qty) = map(int, input().split())
iteration = 0
while iteration != target_qty:
	total_money -= unit_price * (iteration + 1)
	iteration += 1
print(abs(total_money) if total_money < 0 else 0)


(a, b, c) = input('').split()
(k, n, w) = (int(a), int(b), int(c))
tot_cost = 0
i = 0
while w > 0:
	tot_cost += k * (i + 1)
	w -= 1
	i += 1
if n - tot_cost > 0:
	print('0')
else:
	print(abs(n - tot_cost))


(cost, myMoney, bananas) = map(int, input().split())
sum = 0
for i in range(1, bananas + 1):
	sum += cost * i
if myMoney >= sum:
	print(0)
else:
	print(sum - myMoney)


def main():
	(k, n, w) = str(input()).split(' ')
	(k, n, w) = (int(k), int(n), int(w))
	count = 0
	for i in range(1, w + 1):
		count += k * i
	if count > n:
		ans = count - n
	else:
		ans = 0
	print(ans)
if __name__ == main():
	main()


temp_mass = list(map(int, input().split()))
k = temp_mass[0]
n = temp_mass[1]
w = temp_mass[2]

def count(value, price):
	counter = 0
	for i in range(value):
		counter += price * (i + 1)
	return counter
if n - count(w, k) > 0:
	print(0)
else:
	print(abs(n - count(w, k)))


m = list(map(int, input().split()))
(k, n, w) = (m[0], m[1], m[2])
need = 0
for i in range(1, w + 1):
	need += k * i
ans = need - n
if ans < 0:
	ans = 0
print(ans)


price = 0
iter = 1
(k, n, w) = list(map(int, input().split()))
for i in range(w):
	price += k * iter
	iter += 1
if price <= n:
	print(0)
else:
	output = price - n
	print(output)


import sys

def main():
	(k, n, w) = map(int, sys.stdin.readline().split())
	s = k * (1 + w) * w // 2
	print(max(s - n, 0))

def __starting_point():
	main()
__starting_point()


(k, n, w) = map(int, input().split(' '))
assert 0 <= n <= 10 ** 9
assert 1 <= k <= 1000
assert 1 <= w <= 1000
totalMoneyNeeded = w * (w + 1) * k // 2
print(max(totalMoneyNeeded - n, 0))


(a, b, c) = [int(x) for x in input().split()]
add = 0
for i in range(1, c + 1):
	add = add + a * i
cost = add - b
if cost >= 0:
	print(cost)
else:
	print('0')


inputLine = input()
inputList = inputLine.split(' ')
baseCost = int(inputList[0])
money = int(inputList[1])
banana = int(inputList[2])
cost = int((1 + banana) * banana * baseCost / 2)
if cost <= money:
	print(0)
else:
	print(cost - money)


def func(k, n, w):
	ans = k * (w * (w + 1) // 2) - n
	return ans if ans >= 0 else 0
(k, n, w) = map(int, input().split())
print(func(k, n, w))


import math
from collections import defaultdict
from collections import Counter
import itertools

def solve(k, n, w):
	res = 0
	for i in range(1, w + 1):
		res += k * i
	return res - n if res - n > 0 else 0
(k, n, w) = map(int, input().split(' '))
print(solve(k, n, w))


inputs = list(map(int, input().split(' ')))
x = 0
for i in range(1, inputs[2] + 1):
	x = x + i
borrow = x * inputs[0] - inputs[1]
if borrow < 0:
	print('0')
else:
	print(borrow)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
payment = 0
for i in range(1, w + 1):
	payment += i * k
dollarsrequired = 0
if payment > n:
	dollarsrequired = payment - n
print(dollarsrequired)


import math

def read_ints():
	return map(int, input().split())
a = []
a = list(read_ints())
f = int(a[2] * (2 * a[0] + (a[2] - 1) * a[0]) / 2)
t = f - a[1]
if t > 0:
	print(t)
else:
	print(0)


from re import findall
values = input()
value = list(map(lambda x: int(x), findall('\\d+', values)))
cost = 0
for i in range(1, value[2] + 1):
	cost += i * value[0]
print(cost - value[1] if cost - value[1] > 0 else 0)


(k, n, w) = map(int, input().split())
s = 0
while w != 0:
	s += w * k
	w -= 1
r = s - n
if r < 0:
	r = 0
print(r)


knw_input = [int(x) for x in input().split(' ')]
total_value = 0
for i in range(1, knw_input[2] + 1):
	total_value += i * knw_input[0]
if knw_input[1] > total_value:
	print(0)
else:
	print(abs(total_value - knw_input[1]))


def func(a, b, c):
	suma = 0
	for i in range(1, c + 1):
		suma = suma + i
	suma = suma * a
	if b >= suma:
		return 0
	else:
		return suma - b
count = input().split()
for i in range(len(count)):
	count[i] = int(count[i])
rez = func(count[0], count[1], count[2])
print(rez)


(k, n, w) = [int(t) for t in input().split()]
money = 0
j = k
for i in range(w):
	money += j
	j += k
h = money - n
if h < 0:
	print(0)
else:
	print(h)


(k, n, w) = [int(x) for x in input().split(' ')]

def findCost(k, n, w):
	cost = 0
	for i in range(1, w + 1):
		cost += i * k
	fromFriend = cost - n
	return fromFriend
print(findCost(k, n, w) if findCost(k, n, w) > 0 else 0)


(cost, dollars, num) = [int(x) for x in input().split()]
total_cost = 0
for i in range(1, num + 1):
	total_cost += i * cost
if total_cost <= dollars:
	print(0)
else:
	print(total_cost - dollars)


(k, w, n) = input().split()
x = int(k)
y = int(w)
z = int(n)
sum = 0
i = 1
while i <= z:
	sum = i * x + sum
	i += 1
if sum - y <= 0:
	print(0)
else:
	print(sum - y)


(a, b, c) = map(int, input().split())
x = 0
while c > 0:
	x = x + a * c
	c = c - 1
if x <= b:
	print(0)
else:
	print(x - b)


def main():
	(k, n, w) = map(int, input().split())
	p = 0
	for i in range(1, w + 1):
		p += k * i
	if p > n:
		print(abs(n - p))
	else:
		print(0)
main()


(first_banana, money, banana_count) = map(int, input().split())
result = 0
for i in range(1, banana_count + 1):
	result += first_banana * i
b = result - money
print(b if b > 0 else 0)


inputs = input().split(' ')
totalMoneyNeeded = int(inputs[2]) * (int(inputs[2]) + 1) * int(inputs[0]) / 2
print(int(max(totalMoneyNeeded - int(inputs[1]), 0)))


(k, n, w) = [int(j) for j in input().split()]
ans = max(0, k * w * (w + 1) / 2 - n)
print(int(ans))


def main():
	(k, n, w) = map(int, input().split())
	m = 0
	suma = 0
	for i in range(w):
		suma += i + 1
	m = suma * k
	if n < m:
		print(m - n)
	else:
		print(0)
main()


(cost_1st, dollars_in_pocket, number_of_bananas) = map(int, input().split())
if sum((cost_1st * i for i in range(1, number_of_bananas + 1))) > dollars_in_pocket:
	print(sum((cost_1st * i for i in range(1, number_of_bananas + 1))) - dollars_in_pocket)
else:
	print(0)


values = input().split()
cost = int(values[0])
money = int(values[1])
number = int(values[2])
multiplier_number = 1
total_cost = cost
total = []
while multiplier_number <= number:
	total_cost = multiplier_number * cost
	total.append(total_cost)
	multiplier_number += 1
burrow = sum(total) - money
if burrow < 0:
	burrow = 0
print(burrow)


(firstBanana, money, bananaGoal) = [int(x) for x in input().split()]
cost = 0
for i in range(1, bananaGoal + 1):
	cost += i * firstBanana
if money >= cost:
	print(0)
else:
	print(cost - money)


import sys

def gets():
	return sys.stdin.readline().strip()

def get():
	return int(sys.stdin.readline().strip())

def geti():
	return map(int, sys.stdin.readline().strip().split())

def getli():
	return list(map(int, sys.stdin.readline().strip().split()))
(k, n, w) = geti()
Sum = 0
for i in range(1, w + 1):
	Sum += i * k
if Sum <= n:
	print(0)
else:
	print(Sum - n)


from sys import stdin, exit
(first_banana_cost_str, soldier_money_str, num_bananas_str) = stdin.readline().strip().split(' ')
(first_banana_cost, soldier_money, num_bananas) = (int(first_banana_cost_str), int(soldier_money_str), int(num_bananas_str))
if num_bananas == 0:
	print(0)
	exit(2)
total_bananas_cost = first_banana_cost
for i in range(2, num_bananas + 1):
	total_bananas_cost += first_banana_cost * i
money_to_borrow = total_bananas_cost - soldier_money
output = money_to_borrow if money_to_borrow > 0 else 0
print(output)


def borrow_needed(k, n, w):
	soldier_wallet = n
	total_price = 0
	for i in range(w):
		total_price += (i + 1) * k
	if total_price > soldier_wallet:
		return total_price - soldier_wallet
	else:
		return 0

def main():
	(k, n, w) = [int(i) for i in input().split()]
	amount = borrow_needed(k, n, w)
	print(amount)
main()


(lambda n: print(max(sum(range(n[2] + 1)) * n[0] - n[1], 0)))(list(map(int, input().split())))


(x, y, z) = map(int, input().split())
amt = y - z * (z + 1) // 2 * x
if amt < 0:
	print(abs(amt))
else:
	print(0)


arr = list(map(int, input().split()))
cost_per_banana = arr[0]
initial_dollar = arr[1]
need_banana = arr[2]
total_need = 0
while need_banana != 0:
	total_need = total_need + cost_per_banana * need_banana
	need_banana -= 1
borrow = total_need - initial_dollar
if borrow > 0:
	print(borrow)
else:
	print('0')


(k, d, t) = map(int, input().split())
g = 0
s = k * (t * (t + 1) // 2)
if s - d <= 0:
	print(0)
else:
	print(s - d)


(k, n, w) = [int(i) for i in input().split()]
dolg = 0
for i in range(w):
	n -= (i + 1) * k
	if n < 0:
		dolg += abs(n)
		n = 0
print(dolg)


n = list(map(int, input().split()))
sums = 0
for i in range(1, n[2] + 1):
	sums += i * n[0]
if sums == n[1] or sums < n[1]:
	print(0)
else:
	print(sums - n[1])


x = list(map(int, input().split(' ')))
y = int(x[0] * (x[2] * (x[2] + 1) / 2) - x[1])
if y < 0:
	y = 0
print(y)


(first, money, n_ban) = [int(u) for u in input().split()]
money_r = first * (n_ban * (n_ban + 1) // 2)
if money > money_r:
	print('0')
else:
	print(money_r - money)


R = lambda : map(int, input().split())
(k, n, w) = R()
t = 0
for i in range(w):
	t += k * (i + 1)
print(0 if n - t > 0 else abs(n - t))


inputlist = input().split()
k = int(inputlist[0])
n = int(inputlist[1])
w = int(inputlist[2])
bananacost = k * w * (w + 1) / 2
if n > bananacost:
	print(0)
else:
	print(int(bananacost - n))


s = input()
a = s.split()
for i in range(0, len(a)):
	a[i] = int(a[i])
k = a[0]
n = a[1]
w = a[2]
count = 0
for i in range(w):
	count += (i + 1) * k
borrow = count - n
if borrow < 0:
	print('0')
else:
	print(borrow)


lisa = input()
lisa = lisa.split(' ')
jin = [0] * len(lisa)
for i in range(len(lisa)):
	jin[i] = int(lisa[i])
total = 0
for i in range(1, jin[2] + 1):
	total += i * jin[0]
if total - jin[1] > 0:
	print(total - jin[1])
else:
	print(0)


l = list(map(int, input().split()))
cost = l[0]
money = l[1]
quant = l[2]
r = int(cost * quant * (quant + 1) / 2)
if r <= money:
	print(0)
else:
	print(r - money)


def main():
	inp = [int(x) for x in input().split()]
	(k, n, w) = (inp[0], inp[1], inp[2])
	total_cost = k * w * (w + 1) / 2
	borrow = total_cost - n
	if borrow > 0:
		print(int(borrow))
	else:
		print(0)
main()


(a, b, c) = [int(x) for x in input().split()]
d = 0.5 * c * (c + 1) * a
print(max(0, int(d - b)))


def main():
	(k, n, w) = list(map(int, input().split(' ')))
	for (x, i) in enumerate(range(w)):
		n -= k * (x + 1)
	if n > 0:
		print(0)
	else:
		print(abs(n))
main()


def fk(n):
	res = 0
	for i in range(1, n + 1):
		res += i
	return res
y = [int(i) for i in input().split()]
k = y[0]
n = y[1]
w = y[2]
q = k * fk(w)
o = q - n
if o <= 0:
	print(0)
else:
	print(o)


from sys import stdin, stdout
import math
from itertools import permutations, combinations
from collections import defaultdict
from collections import Counter
from bisect import bisect_left
import sys
from queue import PriorityQueue
import operator as op
from functools import reduce
mod = 1000000007

def L():
	return list(map(int, stdin.readline().split()))

def In():
	return map(int, stdin.readline().split())

def I():
	return int(stdin.readline())

def printIn(ob):
	return stdout.write(str(ob) + '\n')

def powerLL(n, p):
	result = 1
	while p:
		if p & 1:
			result = result * n % mod
		p = int(p / 2)
		n = n * n % mod
	return result

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def isPrime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def myCode():
	(k, n, w) = In()
	ans = w * (2 * k + (w - 1) * k) // 2 - n
	print(ans if ans > 0 else 0)

def main():
	myCode()
main()


s = input().split(' ')
(k, n, w) = [int(s[i]) for i in range(0, 3)]
a = 0
for i in range(1, w + 1):
	a += i * k
a -= n
if a < 0:
	print(0)
else:
	print(a)


x = [int(x) for x in input().split()]
dollars = 0
need = 0
i = 1
while i <= x[2]:
	dollars += i * x[0]
	i += 1
need = dollars - x[1]
if need > 0:
	print(need)
elif need <= 0:
	print(0)


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))
i = 1
y = 0
while i <= c:
	y = y + i
	i = i + 1
x = a * y
if x > b:
	print(x - b)
elif x <= b:
	print(0)


import sys
input = sys.stdin.readline
data = input().strip().split(' ')
banana_price = int(data[0])
money_available = int(data[1])
n = int(data[2])
total_price = int((n * n + n) / 2 * banana_price)
if total_price > money_available:
	print(total_price - money_available)
else:
	print(0)


(k, n, w) = map(int, input().split())
i = 1
while n - i * k >= 0 and w > 0:
	n = n - i * k
	i += 1
	w -= 1
rem = n
borrow = 0
while w > 0:
	borrow += i * k - rem
	rem = 0
	i += 1
	w -= 1
print(borrow)


inp = [int(x) for x in input().split()]
first_banana = inp[0]
soldier_amt = inp[1]
banana_needed = inp[2]
total_amt = 0
while banana_needed > 0:
	total_amt += first_banana * banana_needed
	banana_needed -= 1
if total_amt <= soldier_amt:
	print('0')
else:
	print(total_amt - soldier_amt)


a = input().split()
b = [int(i) for i in a]
i = 1
c = b[0]
d = b[1]
e = b[2]
sum = 0
for x in range(1, e + 1):
	sum += c * i
	i += 1
dolg = d - sum
if dolg < 0:
	print(dolg * -1)
else:
	print(0)


import sys
sa = sys.stdin.readline()
list = sa.split()
x = int(list[0])
n = int(list[2])
m = int(list[1])
sum = 0
count = 1
for i in range(0, n):
	sum += x * count
	count += 1
if sum > m:
	print(sum - m)
else:
	print(0)


a = [int(i) for i in input().split(' ')]
k = a[0]
n = a[1]
w = a[2]
sum = w * (w + 1) / 2
price = sum * k
required = price - n
if required > 0:
	print(int(required))
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
sum = 0
for j in range(1, w + 1):
	q = j * k
	sum = sum + q
if sum > n:
	p = sum - n
	print(p)
else:
	print(0)


(firstCost, moneyAvail, bananas) = input().split()
(firstCost, moneyAvail, bananas) = [int(x) for x in [firstCost, moneyAvail, bananas]]
subTotal = 0
for i in range(1, bananas + 1):
	subTotal += firstCost * i
if subTotal > moneyAvail:
	print(str(int(subTotal - moneyAvail)))
else:
	print(0)


string = input().split(' ')
k = int(string[0])
n = int(string[1])
w = int(string[2])
totalNeeded = w / 2 * (1 + w) * k
print(round(max(0, totalNeeded - n)))


s = str(input()).split()
k = int(s[0])
n = int(s[1])
w = int(s[2])
total_cost = 0
for i in range(1, w + 1):
	total_cost += i * k
total_needed = total_cost - n
if total_needed < 0:
	total_needed = 0
print(total_needed)


(k, n, w) = [int(j) for j in input().split()]
s = 0
for i in range(w):
	s += (i + 1) * k
if s > n:
	print(str(s - n))
else:
	print('0')


l = [int(x) for x in input().split()]
e = 0
for q in range(l[2] + 1):
	e += q * l[0]
print(max(0, e - l[1]))


s = input().split()
ptp = 0
k = int(s[0])
n = int(s[1])
w = int(s[2])
for i in range(1, w + 1):
	x = i * k
	ptp += x
borrow = ptp - n
if borrow >= 0:
	print(borrow)
else:
	print(0)


import sys
t = sys.stdin.readline()
l = []
while t:
	a = t.split()
	k = int(a[0])
	m = int(a[1])
	w = int(a[2])
	cost = int(k * (w + 1) * w / 2)
	if m > cost:
		print(0)
	else:
		print(cost - m)
	l = []
	t = sys.stdin.readline()


(k, n, w) = map(int, input().split())
index = 1
while w != 0:
	n -= k * index
	w -= 1
	index += 1
print(-n) if n < 0 else print(0)


knw = iter([int(x) for x in input().split(' ')])
k = next(knw)
n = next(knw)
w = next(knw)
ans = k * w * (w + 1) // 2 - n
if ans < 0:
	print(0)
else:
	print(ans)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
cost = 0
number = 1
for i in range(w):
	banana_cost = k * number
	cost += banana_cost
	number += 1
ans = cost - n
if ans >= 0:
	ans = ans
else:
	ans = 0
print(ans)


(k, n, w) = input().split()
n = int(n)
k = int(k)
w = int(w)
total_cost = sum(range(1, w + 1)) * k
if total_cost > n:
	print(total_cost - n)
elif total_cost <= n:
	print(0)


def function():
	(k, n, w) = map(int, input().split())
	costs = 0
	for i in range(1, w + 1):
		costs = costs + i * k
	borrow = costs - n
	if borrow < 0:
		borrow = 0
	print(borrow)
function()


(multiplier, initial, fruits) = map(int, input().split())
required = fruits * (fruits + 1) / 2 * multiplier
if required > initial:
	print(int(required - initial))
else:
	print(0)


n = input().split(' ')
for i in range(len(n)):
	n[i] = int(n[i])
cost = 0
for i in range(n[2] + 1):
	cost += i * n[0]
left = n[1] - cost
if left < 0:
	print(abs(left))
else:
	print(0)


(k, n, w) = map(int, input().split())
tot_cost = w * (w + 1) // 2 * k
res = 0
if tot_cost > n:
	res = tot_cost - n
print(res)


import math
(k, n, w) = map(int, input().split())
total = math.ceil(k * (w * (w + 1)) / 2)
a = total - n
print(a if a > 0 else 0)


inp = list(map(int, input().split()))
k = inp[0]
n = inp[1]
w = inp[2]
tot = 0
for each in range(1, w + 1):
	tot = tot + each * k
if tot < n:
	print(0)
else:
	print(tot - n)


(k, n, w) = [int(e) for e in input().split()]
Payment = k * w * (w + 1) / 2
print(int(Payment - n)) if Payment > n else print(0)


from decimal import Decimal
(cost, money, bananas) = [int(i) for i in input().split(' ')]
result = cost * bananas * (bananas + 1) / 2
if result >= money:
	print(format(Decimal(str(result - money)).normalize(), 'f'))
else:
	print(0)


(costper1, dollars, num) = input().split()
costper1 = int(costper1)
dollars = int(dollars)
num = int(num)
cost = 0
for i in range(1, num + 1):
	cost += i * costper1
if cost > dollars:
	borrow = cost - dollars
	print(borrow)
else:
	print('0')


(k, n, w) = (int(x) for x in input().split())
tk = 0
for i in range(w):
	tk += (i + 1) * k
bor = tk - n
print(bor if bor >= 0 else 0)


(banana, money, amount) = list(map(int, input().split()))
b_cost = []
for i in range(1, amount + 1):
	b_cost.append(i * banana)
loan = sum(b_cost) - money
if loan == 0 or loan < 0:
	print(0)
else:
	print(loan)


value = str(input(''))
l = value.split()
for i in range(0, 3):
	l[i] = int(l[i])
quantity = 0
for j in range(1, l[2] + 1):
	quantity = quantity + j
total = quantity * l[0]
balance = l[1] - total
if balance >= 0:
	print('0')
else:
	print(0 - balance)


(k, n, m) = map(int, input().strip().split())
sn = int(m * (k + m * k) / 2)
if sn > n:
	print(sn - n)
else:
	print(0)


(m, n, a) = map(int, input().split())
b = 1
s = 0
while b < a + 1:
	s = s + b * m
	b = b + 1
r = s - n
if r < 0:
	print(0)
else:
	print(r)


a = input().split()
(k, n, w) = a
k = int(k)
n = int(n)
w = int(w)
total_price = 0
for i in range(0, w + 1):
	total_price = total_price + i * k
if n > total_price:
	borrow_money = 0
else:
	borrow_money = total_price - n
print(borrow_money)


lst1 = []
sum = 0
lst1 = [int(item) for item in input('').split()]
for i in range(lst1[2] + 1):
	x = lst1[0] * i
	sum += x
m = sum - lst1[1]
if m <= 0:
	print('0')
else:
	print(m)


def main():
	(k, n, w) = map(int, input().strip().split())
	s = 0
	for i in range(1, w + 1):
		s += i * k
	if s < n:
		print('0')
	else:
		print(s - n)
main()


knw = list(map(int, input().split()))
k = knw[0]
n = knw[1]
w = knw[2]
total = w * (w + 1) * k // 2
print(max(total - n, 0))


(k, n, w) = map(int, input().split())
cost_list = []
for i in range(1, w + 1):
	x = i * k
	cost_list.append(x)
borrow = sum(cost_list) - n
if borrow > 0:
	print(borrow)
else:
	print(0)


deets = input()
deets = deets.split()
for i in range(len(deets)):
	deets[i] = int(deets[i])
(kosten, geld, banenen) = deets
totalKosten = 0
for i in range(banenen):
	totalKosten += (i + 1) * kosten
freund = totalKosten - geld
print(0) if freund < 0 else print(freund)


import sys
user_input = input()
user_input = user_input.split()
user_input = [int(f) for f in user_input]
k = user_input[0]
n = user_input[1]
w = user_input[2]
totalCost = 0
count = 1
while w > 0:
	totalCost += k * count
	count += 1
	w -= 1
if totalCost < n:
	print(0)
else:
	print(abs(totalCost - n))


s = input()
arr = list(map(lambda x: int(x), s.split(' ')))
(k, n, w) = (i for i in arr)
cost = (1 + w) * w // 2 * k
if cost > n:
	print(cost - n)
else:
	print(0)


(k, n, w) = map(int, input().split())
ft = k
lt = w * k
exp = w / 2 * (ft + lt)
borrow = exp - n
if borrow > 0:
	print(int(borrow))
else:
	print(0)


def soldier_with_banana(k, w, n):
	firstvalue = k
	for i in range(2, n + 1):
		k = k + i * firstvalue
	answer = k - w
	if answer < 0:
		print(0)
	else:
		print(answer)
(x, y, z) = str(input()).split(' ')
soldier_with_banana(int(x), int(y), int(z))


k = input().split(' ')
a = int(k[0])
b = int(k[1])
c = int(k[2])
e = 0
for i in range(c + 1):
	d = a * i
	e = e + d
f = e - b
f = int(f)
if f < 0:
	print(0)
else:
	print(f)


def money():
	(k, n, w) = map(int, input().split())
	y = 0
	x = 0
	sum = 0
	for i in range(1, w + 1, 1):
		y = k * i
		sum = sum + y
	if n >= sum:
		return int(0)
	else:
		x = sum - n
		return int(x)
print(money())


str1 = input()
[k, n, w] = [int(ch) for ch in str1.split()]
costOfWBananas = k * w * (w + 1) / 2
if costOfWBananas > n:
	print(int(costOfWBananas - n))
else:
	print(0)


(cost, init, num) = input().split()
cost = int(cost)
init = int(init)
num = int(num)
costi = 0
total = 0
for i in range(num):
	costi = cost * (i + 1)
	total += costi
if total - init > 0:
	print(total - init)
else:
	print('0')


(base_price, dengi, banans_to_buy) = map(int, input().split())
money = 0
for i in range(banans_to_buy):
	if i == 0:
		money = base_price
	else:
		money = money + base_price * (i + 1)
if money > dengi:
	print(money - dengi)
else:
	print(0)


(n, a, b) = input().split()
act_v = 1
money = 0
for i in range(int(b)):
	money += act_v * int(n)
	act_v += 1
st = money - int(a)
if st < 0:
	print(0)
else:
	print(st)


import re
a = re.split(' ', input())
for i in range(0, len(a)):
	a[i] = int(a[i])
c = a[0] * a[2] * (a[2] + 1) / 2
if a[1] >= c:
	print(0)
else:
	print(str(int(c - a[1])))


__author__ = 'Max'
(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
a = k * w * (w + 1) / 2
if a > n:
	d = a - n
	print(int(d))
else:
	print('0')


n = list(map(int, input().split()))
s = 0
for f in range(n[2] + 1):
	s += f * n[0]
if s - n[1] > 0:
	print(s - n[1])
else:
	print(0)


arr = list(map(int, input().split()))
amount = arr[1]
cost = arr[2] / 2 * (2 * arr[0] + (arr[2] - 1) * arr[0])
if cost - amount < 0:
	print(0)
else:
	print(int(cost - amount))


k = [int(i) for i in list(input().split())]
s = sum(range(1, k[2] + 1))
a = k[0] * s - k[1]
if a > 0:
	print(a)
else:
	print(0)


(k, n, w) = map(int, input().split())
s = 0
i = 0
o = 0
while i < w:
	i = i + 1
	s = s + k * i
if s > n:
	o = s - n
print(o)


txt = str(input())
x = txt.split()
p = 0
for i in range(0, int(x[2]) + 1):
	r = i * int(x[0])
	p = p + r
if int(x[1]) > p:
	print(0)
else:
	print(p - int(x[1]))


(k, n, w) = map(int, input().split(' '))
prices = [k * (e + 1) for (e, x) in enumerate(range(w))]
answ = sum(prices) - n
if answ >= 0:
	print(answ)
else:
	print(0)


(a, b, c) = [int(x) for x in input().split()]
t = 0
for i in range(1, c + 1):
	t = t + i
if t * a - b <= 0:
	print(0)
else:
	print(t * a - b)


nums = list(map(int, str(input()).split(' ')))
p = 0
for i in range(1, nums[2] + 1):
	p += i * nums[0]
if p - nums[1] <= 0:
	print('0')
else:
	print(p - nums[1])


inp = input()
inp = inp.split()
cost = int(inp[0])
budget = int(inp[1])
desired_n = int(inp[2])
for i in range(desired_n + 1):
	budget -= cost * i
if budget >= 0:
	budget = 0
else:
	budget = -budget
print(budget)


userInput = list(map(int, input().split()))
totalPrice = userInput[2] * (userInput[2] + 1) // 2 * userInput[0]
print(0 if userInput[1] >= totalPrice else abs(userInput[1] - totalPrice))


val = list(map(int, input().split(' ')))
ans = 0
for i in range(val[2]):
	ans = ans + (i + 1) * val[0]
if val[1] < ans:
	print(abs(val[1] - ans))
else:
	print(0)


a = str(input())
a = a.split(' ')
k = int(a[0])
n = int(a[1])
w = int(a[2])
totalPrice = 0
inc = 1
for i in range(0, w):
	partPrice = k * inc
	inc = inc + 1
	totalPrice = partPrice + totalPrice
if totalPrice - n > 0:
	print(totalPrice - n)
else:
	print(0)


import sys

def lend_money(ints):
	(k, n, w) = ints
	total_cost = k * (w * (w + 1) / 2)
	return max(int(total_cost - n), 0)
for line in sys.stdin:
	array = line.split()
	ints = [int(int_str) for int_str in array]
	money = lend_money(ints)
	print(money)


ip = list(input().split(' '))
sum = 0
for i in range(1, int(ip[2])):
	sum += i
if int(ip[0]) * (int(ip[2]) + sum) - int(ip[1]) < 0:
	result = 0
else:
	result = int(ip[0]) * (int(ip[2]) + sum) - int(ip[1])
print(result)


import sys
(price_banan, count_money, count_banan) = map(int, input().split())
price_banans = 0
multiplicator = 1
for i in range(0, count_banan):
	price_banans += multiplicator * price_banan
	multiplicator += 1
need_money = price_banans - count_money
if need_money > 0:
	print(need_money)
else:
	print(0)


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())
(k, n, w) = get_ints()
cost = 0
for x in range(w):
	cost += (x + 1) * k
print(max(0, cost - n))


def main():
	(k, n, w) = map(int, input().split())
	ans = (k + k * w) * w // 2 - n
	if ans < 0:
		ans = 0
	print(ans)
main()


import math
(k, n, w) = list(map(int, input().split()[:3]))
res = int(w / 2 * (2 * k + (w - 1) * k) - n)
if res < 0:
	print('0')
else:
	print(res)


(cena, ir, grib) = input().split()
i = 0
izt = 0
cena = int(cena)
ir = int(ir)
grib = int(grib)
while i < grib:
	i += 1
	izt = izt + cena * i
fin = izt - ir
if fin < 1:
	print('0')
else:
	print(fin)


(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
ans = c * (c + 1) // 2
ans *= a
ans -= b
if ans < 0:
	ans = 0
print(ans)


x = input()
y = x.split(' ')
z = []
vb = 0
ban = 0
for i in y:
	z.append(int(i))
ban = z[2]
for i in range(1, ban + 1):
	vb += i * z[0]
if z[1] >= vb:
	print(0)
else:
	print(vb - z[1])


def solve():
	(K, N, W) = [int(s) for s in input().split()]
	return max(0, K * W * (W + 1) // 2 - N)
ans = solve()
print(ans)


l = list(map(int, input().split()))
k = l[0]
n = l[1]
w = l[2]
for x in range(1, w + 1):
	n -= x * k
if n > 0:
	n = 0
print(abs(n))


(a1, a2, a3) = input().split()
a1 = int(a1)
a2 = int(a2)
a3 = int(a3)
t = 0
for i in range(1, a3 + 1):
	t = t + a1 * i
if t > a2:
	print(t - a2)
else:
	print(0)


input0 = input().split(' ')
input1 = list(map(int, input0))
k = input1[0]
n = input1[1]
w = input1[2]
total = 0
for i in range(1, w + 1):
	total += i * k
remainder = total - n
if remainder > 0:
	print(remainder)
else:
	print('0')


(k, n, w) = input().split()
cost = 0
for x in range(int(w)):
	cost += (x + 1) * int(k)
needed_money = cost - int(n)
if needed_money <= 0:
	print(0)
else:
	print(needed_money)


x = list(map(int, input().split()))
pay = 0
for j in range(1, x[2] + 1):
	ee = x[0] * j
	pay += ee
if pay - x[1] > 0:
	print(pay - x[1])
else:
	print('0')


(cost, d, n) = [int(x) for x in input().split()]
tcost = 0
for i in range(1, n + 1):
	tcost += i * cost
debt = tcost - d
if debt <= 0:
	print('0')
else:
	print(debt)


masukan = input()
masukanl = []
for i in masukan.split(' '):
	masukanl = masukanl + [int(i)]
k = masukanl[0]
n = masukanl[1]
w = masukanl[2]
harga = 0
for i in range(0, w):
	harga = harga + (i + 1) * k
output = 0
if harga > n:
	output = harga - n
print(output)


z = list(map(int, input().split()))
x = z[0] * z[2] * (z[2] + 1) // 2
a = x - z[1]
if a < 0:
	a = 0
print(a)


(a, n, w) = map(int, input().strip().split())
res = w / 2 * (2 * a + (w - 1) * a)
if res > n:
	print(int(res - n))
else:
	print(0)


(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
count = 0
add = 0
for i in range(0, w):
	count = count + 1
	x = k * count
	if n < x:
		add = add + x - n
		n = 0
	else:
		n = n - x
print(add)


def sum(n):
	sum = 0
	while n:
		sum = sum + n
		n = n - 1
	return sum
(k, n, w) = map(int, input().split(' '))
w = sum(w)
if k * w - n > 0:
	print(k * w - n)
else:
	print(0)


def solve():
	(cost, money, n) = [int(x) for x in input().split()]
	seq_sum = n * (n + 1) // 2
	total = cost * seq_sum
	res = max(total - money, 0)
	print(res)
	return
solve()


def solve(st):
	st = st.split(' ')
	k = int(st[0])
	n = int(st[1])
	w = int(st[2])
	__sum = 0
	for i in range(1, w + 1):
		__sum += i * k
	if n >= __sum:
		return 0
	return __sum - n
st = input()
print(solve(st))


b = list(map(int, input().split()))
t = b[0] * (b[2] + 1) * b[2] // 2
k = t - b[1]
if k > 0:
	print(k)
else:
	print(0)


(k, n, w) = map(int, input().split())
total = (k + w * k) * w // 2
final_total = n - total
if final_total < 0:
	really_final_total = final_total * -1
	print(really_final_total)
else:
	print(0)


n = input()
lst = n.split()
k = int(lst[0])
n = int(lst[1])
w = int(lst[2])
total = 0
for i in range(1, w + 1):
	cost = k * i
	total += cost
req = 0
if n >= total:
	req = 0
elif n < total:
	req = total - n
print(req)


(A, B, C) = input().split()
(a, b, c) = (int(A), int(B), int(C))
i = 1
moneytoborrow = 0
while i <= c:
	moneytoborrow = moneytoborrow + i * a
	i = i + 1
if moneytoborrow - b < 0:
	print('0')
else:
	print(moneytoborrow - b)


(k, n, w) = [int(x) for x in input().split()[:]]
y = sum([c * k for c in range(1, w + 1)]) - n
if y <= 0:
	print(0)
else:
	print(y)


inp = input('').split(' ')
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])

def ap_sum(bananas, cost):
	sum = bananas / 2 * (2 * cost + (bananas - 1) * cost)
	return sum
req_money = ap_sum(w, k)
borrow_money = req_money - n
if borrow_money > 0:
	print(int(borrow_money))
else:
	print(0)


k = list(map(int, input().split()))
p = 0
for i in range(1, k[2] + 1):
	p = p + i * k[0]
if k[1] - p < 0:
	print(abs(k[1] - p))
else:
	print(0)


import sys

def main():
	(k, n, w) = [int(x) for x in sys.stdin.readline().split()]
	print(max(0, w * (w + 1) * k // 2 - n))
main()


while True:
	(k, n, w) = map(int, input().split(' '))
	if k >= 1 and k <= 10 ** 3 and (w >= 1) and (w <= 10 ** 3) and (n >= 0) and (n <= 10 ** 9):
		break
sum = 0
for i in range(w):
	sum += (i + 1) * k
if n >= sum:
	print(0)
else:
	print(sum - n)


l = list(map(int, input().split()))
a = l[0]
b = l[1]
c = l[2]
n = 0
ll = []
for i in range(c):
	n += 1
	ll.append(n)
aa = []
for i in ll:
	i = i * a
	aa.append(i)
ss = sum(aa)
if ss <= b:
	print('0')
else:
	print(ss - b)


import math
s = input()
a = []
a = s.split(' ')
price = int(a[2]) * (int(a[2]) + 1) / 2 * int(a[0])
m = int(a[1])
if price > m:
	print(int(price - m))
else:
	print(0)


inputt = input().split(' ')
BananaCost = int(inputt[0])
Dollars = int(inputt[1])
Cantitate = int(inputt[2])
Imprumut = 0
NewBN = 0
TotalCheltuit = 0
i = 1
while i < Cantitate + 1:
	TotalCheltuit = BananaCost * i + TotalCheltuit
	i += 1
Imprumut = TotalCheltuit - Dollars
if Imprumut <= 0:
	print('0')
else:
	print(Imprumut)


a = input().split(' ')
cost = int(a[0])
money = int(a[1])
want = int(a[2])
total = 0
for i in range(1, want + 1):
	total += i * cost
if total - money <= 0:
	print('0')
else:
	print(total - money)


from sys import stdin
(k, n, w) = map(int, stdin.readline().rstrip().split())
print(max(0, w * (w + 1) // 2 * k - n))


s = input().split()
k = int(s[0])
d = int(s[1])
n = int(s[2])
tc = k * n * (n + 1) // 2
if tc <= d:
	print(0)
else:
	print(tc - d)


p = input().rstrip().split(' ')
a = int(p[0])
b = int(p[1])
c = int(p[2])
f = c * (c + 1) // 2
h = f * a
if h == b:
	print(0)
elif h > b:
	print(h - b)
else:
	print(0)


(p, m, n) = list(map(int, input().split()))
cost = 0
for i in range(1, n + 1):
	cost += i * p
debt = max(0, cost - m)
print(debt)


from sys import stdin, stdout
(k, n, w) = map(int, stdin.readline().rstrip().split())
total = 0
for i in range(1, w + 1):
	total = total + i * k
total = total - n
if total < 0:
	total = 0
stdout.write(str(total) + '\n')


n = list(map(int, input().split()))
cost_banana = n[0]
dollar = n[1]
total = 0
for i in range(1, n[2] + 1):
	total += i * cost_banana
if total - dollar < 0:
	print(0)
else:
	print(total - dollar)


def get():
	res = [int(x) for x in input().split()]
	return res[0] if len(res) == 1 else res
(k, n, w) = get()
print(max(0, k * w * (w + 1) // 2 - n))


sb = str(input())
sb = sb.split(' ')
n = int(int(sb[2]) * (1 + int(sb[2])) / 2)
money = int(sb[0]) * n - int(sb[1])
if money <= 0:
	print('0')
else:
	print(str(money))


(a, b, c) = input().split()
k = int(a)
n = int(b)
w = int(c)
ws = w * (w + 1) / 2
if n > ws * k:
	print('0')
else:
	print(abs(int(n - ws * k)))


from collections import Counter
import math
import sys
from bisect import bisect, bisect_left, bisect_right

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def mod():
	return 10 ** 9 + 7
(k, n, w) = MAP()
ans = k * (w * (w + 1)) // 2 - n
if ans < 0:
	print(0)
else:
	print(ans)


(x, y, z) = map(int, input().split())
count = 0
for n in range(1, z + 1):
	count = count + n * x
if count <= y:
	print('0')
else:
	print(count - y)


(t, c, n) = [int(x) for x in input().split()]
sum = 0
for i in range(1, n + 1):
	sum = sum + i * t
if sum < c:
	print('0')
else:
	print(sum - c)


from math import sqrt, floor

def loan_size(line):
	num_list = list(map(int, line.split(' ')))
	base_cost = num_list[0]
	starting_money = num_list[1]
	bananas_desired = num_list[2]
	total_cost_bananas = bananas_desired * (bananas_desired + 1) * base_cost // 2
	if total_cost_bananas <= starting_money:
		print(0)
	else:
		print(total_cost_bananas - starting_money)
input_str = input()
loan_size(input_str)


(k, n, w) = map(int, input().split(' '))
sum1 = 0
if w == 1:
	print(0)
	exit()
if n == 1000000000:
	print(0)
	exit()
for i in range(1, w + 1):
	sum1 += i * k
if sum1 >= n:
	print(abs(sum1 - n))
else:
	print(0)


(a, d, n) = map(int, input().split(' '))
sum = 0
for i in range(n):
	sum += (i + 1) * a
print(max(sum, d) - d)


(k, n, w) = (int(x) for x in input().split())
totalCost = w * (w + 1) // 2 * k
if n >= totalCost:
	print(0)
else:
	print(abs(totalCost - n))


x = list(map(int, input().split()))
moneyask = x[2] * (x[2] + 1) // 2 * x[0]
moneyreq = moneyask - x[1]
if moneyreq < 0:
	print(0)
else:
	print(moneyreq)


try:
	(k, n, w) = map(int, input().split())
	m = k * (w * (w + 1) // 2) - n
	if m > 0:
		print(m)
	else:
		print(0)
	pass
except Exception:
	pass


from sys import stdin, stdout
import math, sys
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi
import heapq

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def main():
	try:
		(k, n, w) = In()
		t = (w + 1) * w // 2 * k - n
		if t <= 0:
			print(0)
		else:
			print(t)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(1):
	main()


import sys
import math

def totalCostForKtems(initialCost, totalItems):
	return int(initialCost * (totalItems * (totalItems + 1) / 2))
(k, n, w) = map(int, input().split(' '))
total_cost_for_bananas = totalCostForKtems(k, w)
print(0 if n > total_cost_for_bananas else total_cost_for_bananas - n)


(a, c, n) = [int(i) for i in input().split()]
total_cost = n / 2 * (2 * a + (n - 1) * a)
if total_cost - c > 0:
	print(int(total_cost - c))
else:
	print(0)


(k, n, w) = [int(e) for e in input().split()]
bill = (k + k * w) * w // 2
debt = max(bill - n, 0)
print(debt)


lis = list(map(int, input().strip().split()))
cost = lis[0]
moneyHad = lis[1]
banannas = lis[2]
money = 0
for i in range(1, banannas + 1):
	money += i * cost
if money > moneyHad:
	print(money - moneyHad)
else:
	print('0')


(c, m, k) = map(int, input().split())
fc = c * (k * (k + 1) // 2)
if fc - m > 0:
	print(fc - m)
else:
	print(0)


(k, mon, n) = map(int, input().split())
summ = n * (n + 1) // 2
summ *= k
if mon > summ:
	print('0')
else:
	print(summ - mon)


def soldier_and_bananas(cost_banana, initial_dollars, no_bananas):
	total_cost_banana = 0
	for i in range(1, no_bananas + 1):
		total_cost_banana += i * cost_banana
	if total_cost_banana > initial_dollars:
		print(total_cost_banana - initial_dollars)
	else:
		print(0)
(cost_banana, initial_dollars, no_bananas) = map(int, input().split())
soldier_and_bananas(cost_banana, initial_dollars, no_bananas)


(k, n, b) = map(int, input().split())
c = 0
for i in range(b):
	c += k * (i + 1)
print(max(0, c - n))


input_values = input()
(k, n, w) = input_values.split()
output_data = 0
for i in range(1, int(w) + 1):
	output_data = output_data + i * int(k)
result = output_data - int(n)
if result < 0:
	result = 0
print(result)


w = 0
k = 0
n = 0
a = input()
chs = ''
dv = False
nm = 0
for i in a:
	if i != ' ':
		chs += i
	else:
		if dv == False:
			k = int(chs)
			dv = True
		else:
			n = int(chs)
		chs = ''
w = int(chs)
i = 1
for a in range(w):
	nm += int(k) * int(i)
	i += 1
if nm <= n:
	print('0')
else:
	print(nm - n)


(k, n, w) = map(int, input().split())
r = w * (w + 1) // 2
r1 = k * r
r2 = r1 - n
if r2 <= 0:
	print(0)
else:
	print(r2)


from sys import stdin
answers = stdin.read().split()
a = answers.pop(0)
b = answers.pop(0)
c = answers.pop(0)
x = int(a)
y = int(b)
z = int(c)
answer = 0
real_answer = 0
for i in range(z + 1):
	answer += x * i
if answer <= y:
	print('0')
elif answer > y:
	print(abs(answer - y))


def main():
	(k, n, w) = get_ints()
	total = 0
	w = int(w)
	result = 0
	for x in range(1, w + 1):
		total += x
	result = k * total - n
	if result >= 0:
		print(result)
	else:
		print(0)

def get_ints():
	return (int(x) for x in input().split(' '))
main()


(c, m, l) = map(int, input().split())
tot = l * (c + c * l) / 2
print(int(-min(0, m - tot)))


cb_sd_bw = list(map(int, input().split()))
cost_banana = cb_sd_bw[0]
soldier_dollars = cb_sd_bw[1]
quantity = cb_sd_bw[-1]
total_cost = 0
for i in range(1, quantity + 1):
	total_cost += i * cost_banana
if total_cost - soldier_dollars <= 0:
	print('0')
else:
	print(total_cost - soldier_dollars)


insert = input()
x = insert.split()
banana_price = int(x[0])
money = int(x[1])
banana_he_wants = int(x[2])
sum = 0
for each in range(banana_he_wants):
	n = (each + 1) * banana_price
	sum += n
if sum > money:
	print(sum - money)
else:
	print(0)


(k, n, w) = map(int, input().split(' '))
lst = []
for i in range(1, w + 1):
	ele = i * k
	lst.append(ele)
ttl = sum(lst)
req = ttl - n
if req < 0:
	print(0)
else:
	print(req)


(k, n, w) = map(int, input().strip().split(' '))
s = k * w * (w + 1) // 2
res = max(s - n, 0)
print(res)


(k, n, w) = map(int, input().split())
money = 0
one = 0
for i in range(w):
	one += k
	money += one
if money <= n:
	print('0')
else:
	print(money - n)


data = input().split()
first_price = int(data[0])
initial_money = int(data[1])
num = int(data[2])
total = 0
for i in range(1, num + 1):
	total += i * first_price
if total <= initial_money:
	print('0')
else:
	print(total - initial_money)


import sys

def bananas():
	datos = sys.stdin.readline().strip().split()
	datosn = []
	valores = []
	t = 1
	for i in range(0, len(datos)):
		datosn.append(int(datos[i]))
	while t != datosn[2] + 1:
		valores.append(datosn[0] * t)
		t += 1
	if datosn[1] > sum(valores):
		print(0)
	else:
		print(sum(valores) - datosn[1])
bananas()


bananas = input().split()
cost_banana = int(bananas[0])
initial_dollars = int(bananas[1])
no_of_bananas = int(bananas[2])
total = 0
while no_of_bananas > 0:
	total = total + cost_banana * no_of_bananas
	no_of_bananas = no_of_bananas - 1
if initial_dollars >= total:
	print(0)
else:
	print(total - initial_dollars)


(k, n, w) = map(int, input().split())
p = []
j = k
for i in range(1, w + 1):
	p.append(i * j)
if sum(p) <= n:
	print(0)
if sum(p) > n:
	s = sum(p) - n
	print(s)


knw = input()
knw = knw.split()
k = int(knw[0])
n = int(knw[1])
w = int(knw[2])
price = 0
for ix in range(1, w + 1):
	price += k * ix
bor = price - n
if bor > 0:
	print(bor)
else:
	print(0)


def read_input():
	(k, n, w) = [int(i) for i in input().strip().split(' ')]
	return (k, n, w)

def do_bananas(k, n, w):
	return max(int((w * w + w) / 2 * k - n), 0)

def main():
	(k, n, w) = read_input()
	print(do_bananas(k, n, w))
main()


allstuff = input() + ' '
l = []
current = ''
for i in range(len(allstuff)):
	if allstuff[i] != ' ':
		current += allstuff[i]
		if i != len(allstuff) - 1 and allstuff[i + 1] == ' ':
			current = int(current)
			l += [current]
			current = ''
cost = l[0]
money = l[1]
bananas = l[2]
total = 0
for i in range(1, bananas + 1):
	total += cost * i
if money > total:
	print(0)
else:
	print(total - money)


k = input()
k = k.split()
list = []
for i in k:
	list.append(i)
k = list[0]
k = int(k)
n = list[1]
n = int(n)
w = list[2]
w = int(w)
c = 0
sum = 0
while c != w:
	c = c + 1
	sum = sum + k * c
if sum > n:
	print(sum - n)
else:
	print('0')


cmd = [int(i) for i in input().split()]
res = -cmd[1]
for i in range(cmd[2]):
	res += cmd[0] * (i + 1)
print(max(0, res))


inp = input()
inp = inp.split()
k = int(inp[0])
n = int(inp[1])
w = int(inp[2])
j = 0
sum = 0
for i in range(w + 1):
	j = k * i
	sum += j
	j = 0
if n - sum == 0:
	print(0)
elif n > sum:
	print(0)
else:
	print(abs(n - sum))


c = input()
x = c.split(' ')
v = []
p = 0
o = 0
for i in x:
	v.append(int(i))
o = v[2]
for i in range(1, o + 1):
	p += i * v[0]
if v[1] >= p:
	print(0)
else:
	print(p - v[1])


n = input().split(' ')
price = int(n[0])
k = 0
for i in range(1, int(n[2]) + 1):
	k += price * i
print(0 if k - int(n[1]) < 0 else str(k - int(n[1])))


(k, n, m) = map(int, input().split())
su = k
for i in range(2, m + 1):
	su = su + i * k
if su <= n:
	print('0')
else:
	print(su - n)


(k, n, w) = map(int, input().split())
tot = w * (w + 1) // 2 * k
dif = tot - n
if dif <= 0:
	print('0')
else:
	print(dif)


num = list(map(int, input().split()))
price = 0
for i in range(num[2]):
	price = price + num[0] * (i + 1)
if price - num[1] <= 0:
	print(0)
else:
	print(price - num[1])


def soldier_and_bananas():
	i = input().split()
	k = int(i[0])
	n = int(i[1])
	w = int(i[2])
	amount = 0
	count = 1
	for z in range(w):
		amount += k * count
		count += 1
	if amount < n:
		print(0)
	else:
		print(amount - n)
soldier_and_bananas()


l = [int(i) for i in input().split()]
for i in range(1, l[2] + 1):
	l[1] = l[1] - l[0] * i
if l[1] >= 0:
	print(0)
else:
	print(abs(l[1]))


n = input()
l = n.split(' ')
a = []
b = 0
ba = 0
for i in l:
	a.append(int(i))
ba = a[2]
for i in range(1, ba + 1):
	b += i * a[0]
if a[1] >= b:
	print(0)
else:
	print(b - a[1])


arr = input().split(' ')
(k, n, w) = [int(_) for _ in arr]
sum = 0
for i in range(1, w + 1):
	sum += i * k
print(sum - n if n < sum else 0)


t = input().split()
a = int(t[0])
s = int(t[1])
d = int(t[2])
p = d * (d + 1) / 2
p = int(p)
p = p * a
y = p - s
if y < 0:
	y = 0
print(y)


params = [int(i) for i in input().split()]
cost = 0
for i in range(1, params[2] + 1):
	cost += i * params[0]
need = params[1] - cost
if need > 0:
	need = 0
else:
	need = abs(need)
print(need)


(cost_of_banana, money, no_of_bananas) = list(map(int, input().split(' ')))
total_cost = 0
for i in range(1, no_of_bananas + 1):
	total_cost += i * cost_of_banana
if total_cost <= money:
	print(0)
else:
	print(total_cost - money)


import sys
(c, b, a) = input().split()
a = int(a)
b = int(b)
c = int(c)
z = int((a + 1) * a * c / 2 - b)
if z < 0:
	print('0')
else:
	print(z)


(k, n, w) = map(int, input().split())
a = []
for i in range(1, w + 1):
	a.append(i * k)
ans1 = sum(a)
if ans1 <= n:
	print(0)
	exit()
else:
	print(sum(a) - n)


nums = [int(x) for x in input().split()]
k = nums[0]
n = nums[1]
w = nums[2]
borrow = 0
need = sum((x * k for x in range(1, w + 1)))
if n - need < 0:
	borrow = need - n
print(borrow)


(k, n, m) = list(map(int, input().split()))
t = 0
for j in range(1, m + 1):
	t += k * j
if t > n:
	print(t - n)
else:
	print('0')


def mGetThePrice(k, w):
	Summation = 0
	for index in range(1, w + 1):
		Summation += index * k
	return Summation

def main():
	try:
		InputArray = list(map(int, input().split()))
		if InputArray.__len__().__eq__(0):
			exit()
		k = InputArray[0]
		n = InputArray[1]
		w = InputArray[2]
		if InputArray.__len__().__eq__(3) and 0 <= n <= pow(10, 9) and (k >= 1) and (w <= 1000):
			price = mGetThePrice(k, w)
			debt = abs(n - price) if n < price else 0
			print(debt)
		else:
			exit(0)
	except ValueError as e:
		pass
main()


def credit(lst):
	res = 0
	for i in range(1, lst[2] + 1):
		res += lst[0] * i
	need_to_rent = res - lst[1]
	if need_to_rent > 0:
		print(need_to_rent)
	else:
		print('0')
amm = 3
inp = [int(inp) for inp in input().split()]
credit(inp)


def mini(k, n, w):
	i = 1
	sum1 = 0
	while i <= w:
		sum1 = sum1 + i * k
		i = i + 1
	if sum1 - n < 0:
		print('0')
	else:
		print(sum1 - n)
(k, n, w) = input().split()
k = int(k)
n = int(n)
w = int(w)
mini(k, n, w)


x = input()
(k, n, w) = x.split(' ')
k = int(k)
n = int(n)
w = int(w)
total = 0
while w != 0:
	total += k * w
	w -= 1
borrow = total - n
if borrow >= 0:
	print(borrow)
else:
	print(0)


reg = input().split(' ')
k = int(reg[0])
n = int(reg[1])
w = int(reg[2])
required = w * (w + 1) * k // 2
if n >= required:
	print('0')
else:
	print(required - n)


(n, m, z) = map(int, input().split())
print(max(0, n * (z * (z + 1) // 2) - m))


list1 = list(map(int, input().split()))
k = list1[0]
n = list1[1]
w = list1[2]
t = 0
for i in range(1, int(w) + 1):
	t += i * k
if n >= t:
	x = 0
	print(x)
else:
	x = abs(t - n)
	print(x)


import math
(k, n, w) = map(int, input().split())
need = n - (k + w * k) / 2 * w
need = 0 if need > 0 else abs(need)
print(int(need) if int(need) == need else need)


numbers = [int(n) for n in input().split()]
cost = numbers[0]
bal = numbers[1]
num = numbers[2]
tcost = 0
for i in range(1, num + 1):
	tcost += cost * i
if tcost < bal:
	print(0)
else:
	print(tcost - bal)


from sys import stdin, exit
(k, n, w) = map(int, stdin.readline().rstrip().split(' '))
total = 0
for i in range(1, w + 1):
	total += i * k
print(max(total - n, 0))


(k, n, w) = input().split()
(k, n, w) = (int(k), int(n), int(w))
cost = 0
for i in range(1, w + 1):
	cost = cost + i * k
borrowed = cost - n
if borrowed < 0:
	borrowed = 0
print(borrowed)


__author__ = 'runekri3'
(k, n, w) = list(map(int, input().split()))
money_necessary = (k + w * k) * w / 2
print(max(0, int(money_necessary - n)))


(cost_first_banana, soldier_money, number_of_bananas) = map(int, input().split())
purchase_amount = 0
loan = purchase_amount - soldier_money
for value in range(1, number_of_bananas + 1):
	purchase_amount += value * cost_first_banana
loan = purchase_amount - soldier_money
if loan >= 0:
	print(loan)
else:
	print(0)


def main():
	(k, w, n) = map(int, input().split())
	x = (n + 1) * n // 2 * k - w
	if x < 0:
		x = 0
	print(x)
main()


def solution(userinput_list):
	answer_sum = 0
	for check in range(0, int(userinput_list[2])):
		answer_sum += int(userinput_list[0]) * (check + 1)
	return answer_sum - int(userinput_list[1])
input1 = list(input().split(' '))
if solution(input1) <= 0:
	print('0')
else:
	print(solution(input1))


data = tuple([int(i) for i in input().split()])
(k, n, w) = data
sum = 0
for i in range(1, w + 1):
	sum += i * k
if sum <= n:
	print(0)
else:
	print(sum - n)


inputs = input().split()
cost_bannana = int(inputs[0])
amount_soldier = int(inputs[1])
no_of_bananas = int(inputs[2])
total_cost = cost_bannana * no_of_bananas * (no_of_bananas + 1) // 2
borrow = total_cost - amount_soldier
if borrow > 0:
	print(borrow)
else:
	print(0)


Str = input()
ss = [int(s) for s in Str.split() if s.isdigit()]
k = ss[0]
n = ss[1]
w = ss[2]
num = k * w * (w + 1) / 2
res = num - n
if res <= 0:
	print('0')
else:
	print(int(res))