Problem:
 Score : 100 points    Problem Statement We have two bottles for holding water.  Bottle 1 can hold up to A milliliters of water, and now it contains B milliliters of water.  Bottle 2 contains C milliliters of water.  We will transfer water from Bottle 2 to Bottle 1 as much as possible.  How much amount of water will remain in Bottle 2 ?      Constraints  All values in input are integers.  1 \leq B \leq A \leq 20  1 \leq C \leq 20         Input Input is given from Standard Input in the following format:  A  B  C       Output Print the integer representing the amount of water, in milliliters, that will remain in Bottle 2 .        Sample Input 1 6 4 3      Sample Output 1 1  We will transfer two milliliters of water from Bottle 2 to Bottle 1 , and one milliliter of water will remain in Bottle 2 .       Sample Input 2 8 3 9      Sample Output 2 4       Sample Input 3 12 3 7      Sample Output 3 0

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def s_list(): return list(input())
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]
def mi(n): return [wi() for _ in range(n)]
def num__grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]
def grid(n): return [s_list() for _ in range(n)]

a, b, c = wi()

if c <= a - b:
    print(0)
else:
    print(c - (a - b))

Solution (Python):
a,b,c = map(int,input().split())
left = a-b
print(max(0,c-left))

Solution (Python):
def remain_c(a, b, c):
  remain = c - (a - b)
  if remain < 0:
    remain = 0

  return remain




if __name__ == '__main__':

  A,B,C = (int(x) for x in input().split())

  print(remain_c(A,B,C))

Solution (Python):
A, B, C = map(int, input().split())
print(max((C - A + B), 0))

Solution (Python):
i = list(map(int, input().split()))
x = i[2] - (i[0] - i[1])
if x >= 0:
    print(str(x))
else:
    print(str(0))

Solution (Python):

def main():
    a, b, c = tuple(map(int, input().rstrip().split()))
    print(max(0, c - (a - b)))


if __name__ == "__main__":
    main()

Solution (Python):
A, B, C = map(int, input().split())
temp = C-A+B
if temp < 0:
  temp = 0
print(temp)

Solution (Python):
nums = input().split()

a = int (nums[0])
b = int (nums[1])
c = int (nums[2])

nokori = a - b

s = c-nokori


if s < 0 :
	s = 0

print (s)

Solution (Python):
a,b,c=map(int,input().split())
if(a-b>c):
    print(0)
else:
    print(c-a+b)

Solution (Python):
a,b,c=map(int,input().split())
print(max(c-a+b,0))

Solution (Python):



A, B, C = map(int, input().split())

if 1 <= B <= A and A <= 20 and 1<= C <= 20:
  C = C-(A-B)
  if C < 0:
    C = 0

  print(C)

Solution (Python):
A,B,C = map(int, input().split())

if C-A+B>0:
    print(C-A+B)
else:
    print(0)

Solution (Python):
A,B,C = map(int,input().split())

print(max(0,C-(A-B)))

Solution (Python):
a, b, c = map(int, input().split())
c=max(c-a+b,0)
print(c)

Solution (Python):
import sys

for l in sys.stdin:
    A, B, C = map(int, l.split())
    result = C + B - A
    print(0 if result < 0 else result)

Solution (Python):
s = list(map(int,input().split()))
if s[0] >= s[1]+s[2]:
  print(0)
else:
  print(s[1]+s[2]-s[0])

Solution (Python):
l = input().split()
a,b,c = int(l[0]), int(l[1]), int(l[2])

cap = a-b

if c >= cap:
  print(c-cap)
else:
  print(0)

Solution (Python):
A,B,C=input().split(" ")
A,B,C=int(A),int(B),int(C)
r=C-(A-B)

if r>=0:
  print(r)
elif r<0:
  print(0)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A, B,C = inputMap()

	tmp = A-B


	print(max(0,C-tmp))


if __name__ == "__main__":
	main()

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

ans = int(0)

ans = c-(a-b)

if ans < 0:
  ans = 0
  
print(ans)

Solution (Python):
A_B_C = input().split()
A = int(A_B_C[0])
B = int(A_B_C[1])
C = int(A_B_C[2])

left = 0
if A >= (B+C):
  left = 0
else:
  left = C - (A-B)
print(left)

Solution (Python):

A, B, C = map(int, input().split())
print(max((C - A + B), 0))

Solution (Python):
input = input().split(" ")
a=input[0]
b=input[1]
c=input[2]
amb= int(a) - int(b)
res=int(c) - int(amb)
if res <= int("0"):
  print("0")
else:
  print(res)

Solution (Python):
A, B, C = map(int, input().split()) 
bl = A-B
ans = C-bl

if ans >= 0:
    print(ans)
else:
    print(0)

Solution (Python):
a,b,c = list(map(int, input().split()))
print(max(0, b+c-a))

Solution (Python):
A, B, C = map(lambda x: int(x), input().split(' '))
if A - B <= C:
    print(C - (A - B))
else:
    print(0)

Solution (Python):
a, b, c = map(int, input().split())
d = 0
e = c - ( a - b )
if a - b > c:
  print (d)
else:
  print (e)

Solution (Python):
a, b, c = map(int, input().split())
ans = c-a+b
if ans > 0:
    print(ans)
else:
    print(0)

Solution (Python):
A, B, C = list(map(int, input().split(' ')))

if A - B < C:
    rem = C - (A - B)
else:
    rem = 0
print(rem)

Solution (Python):

A,B,C = map(int, input().split())
ans = C - ( A - B )
if ans < 0:
    ans = 0

print (ans)

Solution (Python):
A, B, C = map(int,input().split())
if B+C >= A:
  print(B+C-A)
else:
  print(0)

Solution (Python):
A, B, C = list(map(int,input().split()))
ans = C-A+B
if ans >= 0:
	print(ans)
else:
    print(0)

Solution (Python):
a = input()
b = int(a.split(' ')[1])
c = int(a.split(' ')[2])
a = int(a.split(' ')[0])
out = 0
t = b + c
if t > a:
  out = t - a
print(out)

Solution (Python):
a,b,c=map(int,input().split())
ans=c-(a-b) if c>=a-b else 0
print(ans)

Solution (Python):
a,b,c=map(int,input().split())
if c-(a-b)>0:
  print(c-(a-b))
else:
  print(0)

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

if a-b >= c :
  print(0)
else :
  print(c-(a-b))

Solution (Python):
A, B, C = map(int, input().split())
c = C - (A - B)
if c > 0:
	print(c)
else:
	print(0)

Solution (Python):
[a, b, c] = [int(i) for i in input().split()]

print(max(b + c - a, 0))

Solution (Python):

(A,B,C) = (int(i) for i in input().split(" "))
print(max(C-A+B,0))

Solution (Python):
lvl = [int(x) for x in input().split(' ')]
print(max(0, lvl[2] - lvl[0] + lvl[1]))

Solution (Python):
i = input().split()

a = int(i[0])
b = int(i[1])
c = int(i[2])

t = c - (a - b)

if t < 0:
    t = 0


print(t)

Solution (Python):
n = [int(x) for x in input().split()]

a = n[2] -n[0] +n[1]

if a < 0:
  a = 0
  
print(a)

Solution (Python):
import  numpy   as  np
s_input =   input().split()
i_input =   np.array(s_input).astype("int32")

diff =  i_input[0] - i_input[1]

if(i_input[2] - diff <= 0):
    print("0")
else:
    print("{}".format(i_input[2]-diff))

Solution (Python):
A,B,C=map(int,input().split())
print(max(0,C-(A-B)))

Solution (Python):
a,b,c = [ int(str) for str in input().split()]
anser = c - (a - b) if c - (a - b) > 0 else 0
print(anser)

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

if a-b >= c:
    cup2 = 0

else: 
    cup2 = c - (a-b)

print(cup2)

Solution (Python):
li = list(map(int,input().split()))
ans=li[2]-(li[0]-li[1])
if ans>=0:
    print(ans)
else:
    print("0")

Solution (Python):

a, b, c = map(int, input().split())
if c - (a - b) < 0:
    print(0)
else:
    print(c - (a - b))

Solution (Python):
a, b, c = map(int, input().split())
res_2 = c - (a - b)
if res_2 <= 0:
  print(0)
else:
  print(res_2)

Solution (Python):
a,b,c = map(int,input().split())
if a-b > c:
  print(0)
else:
  print(c-a+b)

Solution (Python):
a, b, c=map(int,input().split())
residue=a-b
if c-residue>0:
    print(c-residue)
else:
    print(0)

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

y_one = b
y_two = c

if a <= b + c:
	y_one = a
	y_two = c - a + b
else:
	y_one = b + c
	y_two = 0
print(y_two)

Solution (Python):
A, B, C = list(map(int, input().strip().split(' ')))
 
print(max(C - (A - B), 0))

Solution (Python):
A,B,C = [int(i) for i in input().split()]
print(C-min(C, A-B))

Solution (Python):
A, B, C=map(int, input().split())


ans = C-(A-B)
if ans<0:
  ans = 0
  
print(ans)

Solution (Python):
A,B,C=map(int,input().split())
D=B+C-A
if D<=0:
  print(0)
else:
  print(D)

Solution (Python):
a, b, c = [int(_) for _ in input().split()]
print(max(c-a+b, 0))

Solution (Python):

A,B,C = map(int,input().split())
print (max(C-(A-B),0))

Solution (Python):
a, b, c = map(int, input().split())
result = c-a+b
if result >= 0:
    print(result)
else:
    print(0)

Solution (Python):
a,b,c=map(int,input().split())
d=a-b
c_d=c-d
if c_d<0:
    print(0)
else:
    print(c_d)

Solution (Python):
A, B, C = map(int, input().split())
if A - B >= C:
    print(0)
else:
    print(C - A + B)

Solution (Python):
input_int = input().split()
input_int = [int(x) for x in input_int]

if input_int[0] > input_int[1] + input_int[2]:
    print(0)
else:
    ans = input_int[2] - input_int[0] + input_int[1]
    print(ans)

Solution (Python):
a,b,c=map(int,input().split())
x=c-a+b
if x<0:
    x=0
print(x)

Solution (Python):
A,B,C = map(int, input().split())
print(max(0,C-(A-B)))

Solution (Python):
A, B, C = map(int,input().split())
print(max(0,B+C-A))

Solution (Python):
if __name__ == '__main__':
    A, B, C = map(int, input().split())
    x = C - (A - B)
    if x < 0 :
        x = 0
    print(x)

Solution (Python):
A,B,C=map(int,input().split())
print(max(0,C-(A-B)))

Solution (Python):
a,b,c=(int(x) for x in input().split())

if a>b+c:
    print(0)
else:
    print(b+c-a)

Solution (Python):
a, b, c = map(int, input().split())
print(max(c-(a-b),0))

Solution (Python):
i,j,k= map(int, input().split())
l=k-(i-j)
if l>=0:
  print(l)
else:
  print(0)

Solution (Python):
numbers = input().split(" ")
A = int(numbers[0])
B = int(numbers[1])
C = int(numbers[2])
 
amount = C - (A - B)
if amount < 0:
  amount = 0
print(amount)

Solution (Python):
A, B, C = map(int, raw_input().split())
delta = min(A-B, C)
print C - delta

Solution (Python):
A,B,C = list(map(int, input().split()))

ans = C - A + B
ans = 0 if ans < 0 else ans
print(ans)

Solution (Python):

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

Solution (Python):
cups = list(map(int,input().split(' ')))
canWater = min(cups[2],cups[0] - cups[1])
aftWater = max(0,cups[2] - canWater)
print(aftWater)

Solution (Python):
a, b, c = map(int, input().split())
d = min(c, a - b)
c -= d
print(c)

Solution (Python):
a, b, c = map(lambda x: int(x), input().split())
tmp = a - b
print(c-tmp if c > tmp else 0)

Solution (Python):
A,B,C = map(int,input().split())
S = C - A + B
if S > 0:
  print(S)
else:
  print("0")

Solution (Python):
A,B,C = map(int,input().split())
D = C-(A-B)
if (D <= 0):
  print(0)
else :
  print(D)

Solution (Python):
ABC = list(map(int, input().split(' ')))
A = ABC[0]
B = ABC[1]
C = ABC[2]

if B + C < A:
    print(0)
else:
    print(C - (A - B))

Solution (Python):
def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    [a, b, c] = li()
    print(max(c - (a - b), 0))

Solution (Python):

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


tmp = a - b
rest = c - tmp

if rest >= 0:
    print rest
else:
    print 0

Solution (Python):
a,b,c = map(int, input().split())
s = c-(a-b)
if s <= 0:
  print(0)
else:
  print(s)

Solution (Python):

 
import os
import sys


a = input().split()
result = int(a[2])+int(a[1])-int(a[0])
if result < 0:
  result = 0
print(result)

Solution (Python):
A,B,C=map(int,input().split())
if C<A-B:
    print(0)
else:
    print(C-A+B)

Solution (Python):



A, B, C = map(int, input().split())

Cap = A - B
Ret = C - Cap
if Ret < 0:
    Ret = 0

print("{}".format(Ret))

Solution (Python):
i = input()
i1 = list(map(int, i.split() ) )
i2 = i1[0] - i1[1]
i3 = i1[2] - i2
if i3 < 0:
 print("0")
else:
 print(i3)

Solution (Python):
A,B,C = map(int,input().split())
if (B + C) < A:
    print("0")
else:
    print(B+C-A)

Solution (Python):
a, b, c = map(int, input().split())
print(max(0, c-(a-b)))

Solution (Python):
import sys


		
def main():
	a, b, c = map(int, input().split())
	ret=max(0, c-(a-b))
	print(ret)
	
	


if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
	else:
		input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
a, b, c = map(int, input().split())
print(max(b + c - a, 0))

Solution (Python):
a, b, c = map(int, input().split())
diff = a - b
if diff >= c:
    print('0')
else:
    print(c - diff)

Solution (Python):
[a,b,c]=list(map(int, input().split()))
nokori=c-a+b
if nokori<0:
	nokori=0
print(nokori)

Solution (Python):
A, B, C = map(int, input().split())

get = A - B

i = C - get

if i < 0:
    i = 0
     
print(i)

Solution (Python):
a,b,c=map(int,input().split())
print(max(b+c-a,0))

Solution (Python):

a, b, c = map(int, input().split())
free_space = a - b
if free_space >= c:
    print(0)
else:
    print(c - free_space)

Solution (Python):
A,B,C=map(int,input().split())
if C >= A - B:
  print(C-A+B)
else:
  print(0)

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

if (a-b)-c >=0 :
    print(0)
    
else : print(abs((a-b)-c))

Solution (Python):
def main():
    a, b, c = map(int, input().split())
    result = c-(a-b)
    if result < 0:
        result = 0

    print(result)

if __name__ == "__main__":
    main()

Solution (Python):
a,b,c = map(int, input().split())
if c-a+b > 0:
  print(c-a+b)
else:
  print(0)

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

print(max(0, (c - (a - b))))

Solution (Python):
A, B, C = map(int, input().split())
if B + C <= A:
    print(0)
else:
    print((B + C) - A)

Solution (Python):
a, b, c = [ int(x) for x in input().split() ]

if c-a+b > 0:
    print(c-a+b)
else:
    print(0)

Solution (Python):
a, b, c = list(map(int, input().split()))


ava_1 = a - b
res_2 = c - ava_1
if res_2 > 0:
    print(res_2)
else:
    print(0)

Solution (Python):
A, B, C = map(int, input().split())
print(max(0, B+C-A))

Solution (Python):
A, B, C = map(int, input().split())

print(C - A + B if C - A + B > 0 else 0)

Solution (Python):
A, B, C = list(map(int, (input().split(' '))))

print(max(C - (A-B), 0))

Solution (Python):
A, B, C= map(int, input().split())
if C < (A-B):
    print("0")
else:
    print(C-(A-B))

Solution (Python):



import sys
input = sys.stdin.readline


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

    print(max(0, c - (a - b)))


if __name__ == '__main__':
    main()

Solution (Python):
A,B,C=map(int,input().split())
w=C-A+B
if w<0:
  w=0
print(w)

Solution (Python):
a,b,c=map(int, input().split())
print(max(0, c - (a-b)))

Solution (Python):
W = input().split()

A = int(W[0])
B = int(W[1])
C = int(W[2])
if C - (A - B) >= 0:
  S = C - (A - B)
else:
  S = 0
print(S)

Solution (Python):
A, B, C = map(int, input().split())
print(max(0, C - (A - B)))

Solution (Python):
a, b, c = map(int, input().split())
ans = c - (a - b)
if ans > 0:
  print(ans)
else:
  print(0)

Solution (Python):
A, B, C = [int(v) for v in input().split(' ')]

cap = A - B

ans = C - cap

if ans < 0:
    ans = 0

print(ans)

Solution (Python):
A,B,C = map(int,input().split())
x = min(A-B,C)
answer = C - x
print(answer)

Solution (Python):


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

ans = c-(a-b)
if ans < 0:
    ans = 0
print(ans)

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

ans = c-(a-b)
if ans<0:
    ans=0
print(ans)

Solution (Python):
A, B, C = map(int, input().split())
if C-A+B>0:
    print(C-A+B)
else:
    print(0)

Solution (Python):
i = input().split()
max = int(i[0])
n = int(i[1])
m = int(i[2])
r = m - (max - n )
if r < 0:
  r = 0
print(r)

Solution (Python):



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


if(a-b >= c):
    print("0")
else:
    print("{}".format(c-a+b))

Solution (Python):
a, b, c = input().strip().split()

a, b, c  = int(a), int(b), int(c)

dif = a - b

if c > dif:
    print(c - dif)
else:
    print(0)

Solution (Python):
a,b,c = map(int,input().split())
print(max(0,c-(a-b)))

Solution (Python):
A, B, C = map(int, input().split())

print(max(C - (A - B), 0))

Solution (Python):
s = list(map(int, input().split()))
a = s[0]
b = s[1]
c = s[2]

def restWater():
    restWater = c - (a - b)
    if restWater >= 0:
        print(restWater)
    else:
        print(0)

restWater()

Solution (Python):
a, b,c = map(int, input().split())
d = c-(a-b)
if d<0:
    d = 0
print(d)

Solution (Python):
A, B, C = map(int, input().split())
if C > (A - B): print(C - (A - B))
else: print(0)

Solution (Python):
li = list(map(int,input().split()))	
result=li[1]+li[2]-li[0]
if result<0:
  result=0
print(result)

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

if b-a+c >= 0:
	print(b-a+c)
else:
  print(0)

Solution (Python):
a, b, c = list(map(int, input().split(' ')))

if c >= a-b:
    result = c - (a - b)
else:
    result = 0
print(result)

Solution (Python):
test = False


def solve_a(test=False, a=0, b=0, c=0):
    if not test:
        a, b, c = map(int, input().split())
    d = max(c - (a - b), 0)
    print(d)


def solve_b(test=False, n=0):
    if not test:
        n = int(input())
    res = 0
    for i in range(1, n + 1):
        if len(str(i)) % 2 == 1:
            res += 1
    print(res)


def solve_c(test=False, n=0, h_list=[]):
    if not test:
        n = int(input())
        h_list = list(map(int, input().split()))
    res = 'Yes'
    new_h_list = [0] * n
    new_h_list[0] = h_list[0] - 1

    for i in range(1, n):
        
        if h_list[i] == new_h_list[i - 1]:
            new_h_list[i] = h_list[i]
        elif h_list[i] < new_h_list[i - 1]:
            new_h_list[i] = h_list[i]
            res = 'No'
        else:
            new_h_list[i] = h_list[i] - 1
    print(res)


if __name__ == "__main__":
    if test:
        solve_a(test=True, a=6, b=4, c=3)
        solve_a(test=True, a=8, b=3, c=9)
        solve_a(test=True, a=12, b=3, c=7)
        solve_b(test=True, n=11)
        solve_b(test=True, n=136)
        solve_b(test=True, n=100000)
        solve_c(test=True, n=5, h_list=[1, 2, 1, 1, 3])
        solve_c(test=True, n=4, h_list=[1, 3, 2, 1])
        solve_c(test=True, n=5, h_list=[1, 2, 3, 4, 5])
        solve_c(test=True, n=1, h_list=[1000000000])
    else:
        solve_a()

Solution (Python):
a, b, c = map(int, input().split())
if c+b-a>=0:
  print(c+b-a)
else:
  print(0)

Solution (Python):
a, b, c = map(int, input().split())
ans = c - (a-b)
if ans < 0:
    ans = 0
print(ans)

Solution (Python):
A, B, C = map(int, input().split())
if B + C > A:
    print(B + C - A)
else:
    print(0)

Solution (Python):
a,b,c=map(int,input().split())
d=min(a,b+c)
print(b+c-d)

Solution (Python):
import os, sys
import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")
 
sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10**18
MOD = 10**9 + 7

def N(): return int(sys.stdin.readline())
def li(): return list(map(int, sys.stdin.readline().split()))
def bulk_li(): return list(map(lambda s: list(map(int, s.split())), sys.stdin.readlines()))

a, b, c = li()

print(max(0, c - (a - b)))

Solution (Python):
A,B,C = map(int, raw_input().split())
print max(C-(A-B), 0)

Solution (Python):
a,b,c = map(int,input().split())
need = a-b
if need <= c:
    print(c-need)
else:
    print(0)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys, math, bisect, random, itertools
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b, c = LI()
    print(c - min(b + c, a) + b)
    return


def B():
    n = II()
    ans = 0
    for i in range(1, n + 1):
        if len(str(i)) % 2:
            ans += 1
    print(ans)
    return


def C():
    n = II()
    h = LI()
    h = h[::-1]
    for i in range(1, n):
        if h[i] <= h[i-1]:
            continue
        if h[i] == h[i - 1] + 1:
            h[i] -= 1
            continue
        print("No")
        return
    print("Yes")
    return


def D():
    s = S()
    lens = len(s)
    ans = [0] * len(s)
    i = 0
    while i != len(s):
        for j in range(i, lens):
            if s[j] == "R":
                continue
            break
        R = j - i
        for i in range(j, lens):
            if s[i] == "L":
                continue
            break
        else:
            i += 1
        L = i - j
        ans[j] = R // 2 + (L+1) // 2
        ans[j - 1] = L // 2 + (R+1) // 2

    print(*ans)
    return


def E():
    return


def F():
    return


if __name__ == '__main__':
    A()

Solution (Python):
a,b,c=map(int,input().split())
print(max(c-a+b,0))

Solution (Python):

import sys







"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def make_divisors(n):
    
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            
            return i
            
            


def n_to_10(X, n):
    if int(X / n):
        return n_to_10(int(X / n), n) + str(X % n)
    return str(X % n)


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()
    """この下から書いてね"""
    a, b, c = ip.IL()
    memo = min(a, b)
    memo2 = a - memo
    print(max(c-memo2, 0))


main()

Solution (Python):
a,b,c=map(int,input().split())
if(c>(a-b)):
    print(c-(a-b))
else:
    print("0")

Solution (Python):
A, B, C = [int(abc) for abc in input().split()]
if B+C-A >= 0:
  print(B+C-A)
else:
  print(0)

Solution (Python):
def inpl(): return list(map(int, input().split()))

A, B, C = inpl()
print(max(0, C - (A-B)))

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

if c-(a-b)>0:
    print(c-(a-b))
else:
    print(0)

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

diff = a - b

if c < diff:
    print(0)
else:
    print(c - diff)

Solution (Python):
num=[int(x) for x in input().split()]
ans=num[2]-(num[0]-num[1])
if ans <0:
  print(0)
else:
  print(ans)

Solution (Python):
A, B, C = map(int, input().split(' '))
print(C-min(A-B, C))

Solution (Python):
def acinput():
    return list(map(int, input().split(" ")))

import numpy as np

a,b,c=acinput()


print(max(c-(a-b),0))

Solution (Python):
def main():
    A, B, C = map(int, input().split())
    output = C - A + B
    if output < 0:
        print(0)
    else:
        print(output)
main()

Solution (Python):

def main():
    A, B, C = [int(f) for f in input().split()]
    print(max(C - (A - B), 0))

if __name__ == "__main__":
    main()

Solution (Python):
A,B,C = input().split()
ans = int(C)-int(A)+int(B)
if(ans>=0):
  print(ans)
else:
  print("0")

Solution (Python):
a, l, b = [int(x) for x in input().split()]

c = b - (a - l)

if c < 0:
  c = 0
  
print(c)

Solution (Python):

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

Solution (Python):
A,B,C = map(int,input().split())
ans = C - A + B
if ans < 0:
    ans = 0
print(ans)

Solution (Python):
A, B, C = map(int, input().split())
Space = A -B

if Space <= C:
  print(C-Space)
else:
  print(0)

Solution (Python):
a, b, c = map(int, input().split())
 
if c - (a-b) <= 0:
    print(0)
else:
    print(c - (a-b))

Solution (Python):
a,b,c=map(int,input().split())
if c-a+b < 0:
	print(0)
else:
	print(c-(a-b))

Solution (Python):
def main():
  a, b, c = map(int, input().split())
  if a-b >= c:
    print(0)
  else:
    print(c-(a-b))


if __name__ == '__main__':
  main()

Solution (Python):
A,B,C = map(int,input().split())
x=C-(A-B)
if x<0:
    x=0
print(x)

Solution (Python):
input_num_list = list(map(int,input().split(" ")))

a = input_num_list[0]
b = input_num_list[1]
c = input_num_list[2]

x = b + c - a

if x < 0 :
    x = 0

print( x )

Solution (Python):
a = list(map(int,input().split()))
n = a[0]-a[1]
if n < a[2]:
    n = a[2] -n
    print(n)
else:
    print(0)

Solution (Python):
a,b,c = map(int,input().split())
r=max(c-(a-b),0)
print(r)

Solution (Python):
A, B, C = list(map(int,input().split()))

if (C<(A-B)):
  print(0)
else:
  print(C-(A-B))

Solution (Python):

A,B,C = map(int,input().split())
print(max(C-(A-B),0))

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

ab = a - b
cab = c - ab
 
if cab < 0:
  print(0)
else:
  print(cab)

Solution (Python):
a, b, c = map(int, input().split())
ans = c-(a-b)
if ans>0:
  print(ans)
else:
  print(0)

Solution (Python):
a, b, c = [int(v) for v in input().split()]

print(max(c - (a - b), 0))

Solution (Python):
a,b,c = map(int, input().split())
d = c-(a-b)
if(d<0):
    d = 0
print(d)

Solution (Python):
a,b,c = map(int, input().split())
s = a-b
if(c > s):
    print(c-s)
else:
    print(0)

Solution (Python):
a, b, c = map(int, input().split())
res_2 = c - (a - b)
if res_2 <= 0:
  print(0)
else:
  print(res_2)

Solution (Python):
a,b,c=map(int,input().split())
if c-(a-b) < 0: 
  print(0)
else:
  print(c-(a-b))

Solution (Python):
def main():
    s = input()
    [a, b, c] = [int(number) for number in s.split()]

    if b + c <= a:
        print(0)
    else:
        print(b + c - a)

if __name__ == '__main__':
    main()

Solution (Python):


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

ans = c-(a-b)

if ans < 0:
    ans = 0

print(ans)

Solution (Python):
a,b,c = map(int,input().split())
if a-b > c:
  r = 0
else:
  r = c - (a-b)
print(r)

Solution (Python):
a,b,c = map(int,input().split())
d = b+c -a
if d <0:
  print(0)
else:
  print(d)

Solution (Python):
A,B,C = map(int,input().split())
if C-(A-B) < 0:
    print(0)
else:
    print(C-(A-B))

Solution (Python):
A, B, C = map(int, input().split())

k = A - B

if C - k < 0:
  print(0)
  
else:
  print(C - k)

Solution (Python):
A,B,C = map(int, raw_input().split())

if C > A-B:
  print(C-(A-B))
else:
  print(0)

Solution (Python):
List = list(map(int,input().split()))
A = List[0]
B = List[1]
C = List[2]

if (C - A + B) >= 0:

	C = C - (A - B)
	print(C)
else:
	print(0)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math

a,b,c = getList()

print(max(c - (a - b), 0))

Solution (Python):
A, B, C = map(int, input().split())

ans = C + B - A 

print(ans) if ans > 0 else print(0)

Solution (Python):
import sys
sys.setrecursionlimit(2**31-1)
input = sys.stdin.readline
write = sys.stdout.write
LMIIS = lambda : list(map(int,input().split()))
II = lambda : int(input())
dbg = lambda *something : print(*something) if DEBUG is True else 0
DEBUG = True

def main():
    a,b,c=LMIIS()
    print(max(c-a+b,0))





    pass
if __name__ == '__main__':
    main()