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



Sample input:
6 4 3


Sample output:
1

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
# import bisect
# import math
# import numpy as np

# from fractions import gcd
# import itertools

"""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進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        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])
                    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):
    # divisors = []
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            # divisors.append(i)
            return i
            # if i != n // i:
            #     divisors.append(n//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():
    # 1文字に省略
    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()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

diff = a - b

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import numpy as np

a,b,c=acinput()


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

c = b - (a - l)

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 )

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#A問題
A,B,C = map(int,input().split())
print(max(C-(A-B),0))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

ans = c-(a-b)

if ans < 0:
    ans = 0

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k = A - B

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

ans = C + B - A 

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

x = c - a + b

if (x < 0):
    x = 0

print(x)

Submission status: Accepted

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

available = A - B
nokori = C - available

if nokori < 0:
  print(0)
else:
  print(nokori)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
  a, b, c = map(int, input().split())
  
  res_1 = a - b
  
  res_2 = c - res_1
  if res_2 <= 0:
    print(0)
  else:
    print(res_2)

Submission status: Accepted

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

empty = a - b

if c <= empty:
    print(0)
else:
    remain = c - empty
    print(remain)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=(int(x) for x in input().split())
if ((c - (a - b)) < 0):
    print(0)
else:
    print(c - (a - b))

Submission status: Accepted

Solution code:
line = input()
tmp = line.split(" ")
a = int(tmp[0])
b = int(tmp[1])
c = int(tmp[2])

p = b + c

if p > a:
  print(p-a)
else:
  print(0)

Submission status: Accepted

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

ans = c - (a - b)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(map(int, input().split()))

if s[2]-s[0]+s[1] < 0 :
    print(0)
else :
    print(s[2]-s[0]+s[1])

Submission status: Accepted

Solution code:
A, B, C = list(map(int, input().split()))
 
ABgap = A - B
remain = max(0, C - ABgap)
 
print(remain)

Submission status: Accepted

Solution code:


res = str(input())

list = res.split(" ")

a = int(list[0])
b = int(list[1])
c = int(list[2])
transferrable = a - b

if c <= transferrable:
    c = 0

else:
    c -= transferrable

print(c)

Submission status: Accepted

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

if b + c <= a:
  restc = 0
elif b + c > a:
  restc = (c+b)-(a)
  
print(restc)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b, c = (int(i) for i in input().split())  
diff = c - (a - b)
if diff > 0 :
    ret  = diff
else:
    ret = 0
print(ret)

Submission status: Accepted

Solution code:
list1=[int(i) for i in input().split()]
A = list1[0]
B = list1[1]
C = list1[2]
#print(A)

tobe = int(A)- int(B)
if tobe < 0:
  tobe = int(0)

#print(tobe)

answer = int(C) - int(tobe)
if answer < 0:
  answer = int(0)
print(int(answer))

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
  print(C)

Submission status: Accepted

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

rest = a-b

ans = c-rest
if ans<0: ans = 0

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from sys import stdin
import math

# 標準入力をスペースで区切って、intに変換 listに収納
int_list  = [int(x) for x in stdin.readline().rstrip().split()]


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

insert_amount_of_water = a - b

surplus = c - insert_amount_of_water 

if surplus <= 0:
    surplus = 0

print(surplus)

Submission status: Accepted

Solution code:
str = input().split(" ")

if int(str[0])-int(str[1]) >= int(str[2]):
    print(0)
else:
    print(int(str[2])-int(str[0])+int(str[1]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b ,c = list(map(int, input().rstrip().split()))
rem = c - a + b
if rem >= 0:
  print(rem)

else:
  print(0)

Submission status: Accepted

Solution code:
# 2019/08/04
# AtCoder Beginner Contest 136 - A

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

# Calc
if a - b > c:
    ans = 0
else:
    ans = c - (a - b)

# Output
print(ans)

Submission status: Accepted

Solution code:
H = list(map(int,input().split()))
print (max(H[2]-(H[0]-H[1]),0))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    
    a, b, c = map(int, input().split())
    if c-(a-b) >= 1:
        print(c-(a-b))
    else: print(0)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x = input()
A, B, C = [int(y) for y in x.split(" ")]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a = list(map(int, input().split()))
    print(max(a[2] - (a[0] - a[1]), 0))
main()

Submission status: Accepted

Solution code:
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

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

    answer = B + C - A

    if answer < 0:
        answer = 0

    print(answer)
    
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin

# 空白で分割しつつ数値に変換
A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

def main():
    x = B + C
    ans = x - A
    if ans >= 0:
        print("{}".format(ans))
    else:
        print("{}".format(0))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))

A = N[0]
B = N[1]
C = N[2]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inp = input().split()
a = int(inp[0])
b = int(inp[1])
c = int(inp[2])

def move(a, b, c):
    ava = a-b
    wat = b
    # 5-3 2
    if(ava >= c):
        ava -= c
        wat += c
        c = 0
    elif(ava < c):
        c = c - ava
        wat += ava
        ava = 0

    print(c)
move(a, b, c)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

c1 = b
c2 = c
cap = a - b

c1 = c1 + cap
c2 = c2 - cap

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B, C = [ int(x) for x in input().split() ]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if d>=0:
    print(d)

else:
    print(0)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = list(map(int, input().split()))

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

Submission status: Accepted

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

result = b + c - a

if result < 0:
  result = 0

print(result)

Submission status: Accepted

Solution code:
a, b, c = tuple([int(_) for _ in input().split()])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int, input().split())
d = C - A + B

if d <= 0: print(0)
else: print(d)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
X = B+C

Y = X-A
if Y <= 0:
  print(0)
else:
  print(Y)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#a = int(input())
# スペース区切りの整数の入力
a, b, c = map(int, input().split())
# 文字列の入力
#s = input()
# 出力
print("{}".format(max(0, c-(a-b))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

container1 = B
container2 = C

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

Submission status: Accepted

Solution code:
a, b, c = input().split()
A = int(a)
B = int(b)
C = int(c)

k = A - B

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial

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






if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(C - min(A - B, C))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data=input().rstrip().split(" ")
a = int(data[0])
b = int(data[1])
c = int(data[2])
if b+c-a>0:
  print(b+c-a)
else:
  print(0)

Submission status: Accepted

Solution code:
a_max, a_in, b_in = input().split()
print(max(0, int(a_in) + int(b_in) - int(a_max)))

Submission status: Accepted

Solution code:
inpl = lambda: list(map(int,input().split()))
A, B, C = inpl()
print(max(0,B+C-A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int,raw_input().split())
t = min(a-b,c)
print(c-t)

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
if C - (A - B) >= 0:
    print(C - (A - B))
elif C - (A - B) < 0:
    print(0)

Submission status: Accepted

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

sa_youki2 = c- (a - b)

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    A, B, C = [int(x) for x in stdin.readline().rstrip().split()]

    x = A - B

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: utf-8

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

water_numbers = b + c
rest = water_numbers - a

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os,re
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations
from sys import stdin,setrecursionlimit
from copy import deepcopy
setrecursionlimit(10**6)

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

Submission status: Accepted

Solution code:
A, B, C = map(int, raw_input().split())
ans = C - (A - B)
if ans < 0:
    print('0')
else:
    print(ans)

Submission status: Accepted

Solution code:
a,b,c=list(map(int,input().split()))
           
d=a-b
e=c-d

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

Submission status: Accepted

Solution code:
param = list(map(int, input().split()))
tmp = param[2] - (param[0] - param[1])

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

Submission status: Accepted

Solution code:
a,b,c=[int(i) for i in input().split()]
if c-(a-b)<0:
    print(0)
else:
    print(c-(a-b))

Submission status: Accepted

Solution code:
# -.- coding:utf-8 -.-

hl = [int(i) for i in input().split()] 

capacity = hl[0] - hl[1]

if capacity - hl[2] < 0:
  print(abs(capacity - hl[2]))
else:
  print("0")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x = input().split()


d = int(x[2])-(int(x[0])-int(x[1]))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
A,B,C = map(int, sys.stdin.readline().rstrip().split())
print(max([C-(A-B), 0]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
 
a, b, c = map(int, input().split())
 
d = a-b
ans = c-d
if ans > 0:
    print(c-d)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().strip().split()))
ans = max(c - (a - b), 0)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = (int(x) for x in input().split())
res = c - a + b
if res < 0:
  res = 0
  
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

print(max(ans, 0))

Submission status: Accepted

Solution code:
import sys

def main():
    A,B,C = tuple(map(int, sys.stdin.readline().split()))

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

if __name__=='__main__':
    main()

Submission status: Accepted

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

result = c - (a - b)

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

Submission status: Accepted

Solution code:
import numpy

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

    rest = a - b
    if rest < c:
        print(c-rest)
    else:
        print('0')
        
if __name__ == '__main__':
    main()

Submission status: Accepted

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

c = A-B

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
left_in_c = c - (a -b )
if left_in_c <=0:
  left_in_c =0
print("{}".format(left_in_c));

Submission status: Accepted

Solution code:


def main():

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

    if C-cap > 0:
        print(C-cap)
    else:
        print(0)

        
    
if __name__== "__main__":
    main()

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = c - a + b

print(k if (k >= 0) else 0)

Submission status: Accepted

Solution code:
inputed_info = input()

A = int(inputed_info[0:inputed_info.find(" ")])
inputed_info = inputed_info[inputed_info.find(" ")+1:]
B = int(inputed_info[0:inputed_info.find(" ")])
inputed_info = inputed_info[inputed_info.find(" ")+1:]
C = int(inputed_info)

C_after = C - A + B

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

Submission status: Accepted

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

Submission status: Accepted

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

print(B)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

ABC =  list(int(i) for i in input().split())
"""
ABC=[12,3,7]
"""
ans = ABC[2]-ABC[0]+ABC[1]
if ans < 0:
    ans = 0

print(ans)