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-----
6 4 3

-----Sample Output-----
1

We will transfer two milliliters of water from Bottle 2 to Bottle 1, and one milliliter of water will remain in Bottle 2.

Difficulty: introductory

Starter code:

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

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


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

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

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

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

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

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

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


# 136a
def atc_136a(input_v: str) -> int:
    ABC = input_v.split(" ")
    A = int(ABC[0])
    B = int(ABC[1])
    C = int(ABC[2])

    D = C - (A - B)

    if D < 0:
        return 0
    else:
        return D

abc = input()
print(atc_136a(abc))

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

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



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

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

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

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

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

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


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


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

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

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

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

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

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

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


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

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

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

a, b, c = [int(i) for i in input().split()]
ans = c - (a - b)
ans = ans if ans >= 0 else 0
print(ans)

A, B, C = [int(n) for n in input().split()]
print(max(0, C-(A-B)))

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

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


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

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



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

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

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


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

def water(A, B, C):
    result = C - (A - B)
    return max(0, result)


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

print((water(A, B, C)))


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

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

else:
    print('0')


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

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

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

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

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

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

def __starting_point():
    main()
__starting_point()

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

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

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

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


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

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

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

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

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

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

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

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


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

a,b,c=map(int,input().split());print([c,[0,c-(a-b)][c-(a-b)>0]][a-b>0])

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

#   Transfer

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

residue = c - (a - b)
if residue<0:
    residue=0

print(residue)



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

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

answer = C - (A - B)

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

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

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

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

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

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

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



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


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

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

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

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

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

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

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

#!/usr/bin/env python3

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


def __starting_point():
    main()

__starting_point()

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


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

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

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

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

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

x = a - b
y = c - x

if y <= 0:
    print("0")

else:
    print(y)

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


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

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


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

# 容器１の空き容量x
x = a - b

# 容器２に残る水の量y
y = c - x
if c - x >= 0:
    print(y)

if c - x <0:
    print('0')

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

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

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

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

x = min(a - b, c)
print((c - x))


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

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


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

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

#   Transfer

def return_residue(a, b, c):
    residue = c - (a - b)
    return max(0, residue)


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

print((return_residue(a, b, c)))


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

#136-A

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

#print(C - A + B)

ans = C - A + B

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

else:
    print(ans)


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

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

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

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

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


a = list(map(int,input().split()))
A = a[0]
B = a[1]
C = a[2]

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

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


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

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

rest = C - (A - B)

if rest > 0:
    print(rest)
else:
    print('0')

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

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

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

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

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

a, b, c = list(map(int, input().split()))
into_a = a - b
remain_c = c - into_a

if remain_c > 0:
  print(remain_c)
else:
  print((0))




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

container1 = a - b
container2 = c - container1

if container2 > 0:
    print(container2)
else:
    print(0)

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

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

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

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

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

f1 = a - b
f2 = c - f1

if f2 <= 0:
    print('0')
else:
    print(f2)

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

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

#
# abc136 a
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """6 4 3"""
        output = """1"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """8 3 9"""
        output = """4"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """12 3 7"""
        output = """0"""
        self.assertIO(input, output)


def resolve():
    A, B, C = list(map(int, input().split()))

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


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

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

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

#ABC136 A

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