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:
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
# 一次元累積和
from itertools import accumulate
from bisect import bisect_left, bisect_right

import re
# import numpy as np
# from scipy.misc import comb

# 再帰がやばいとき
# import sys
# sys.setrecursionlimit(10**9)

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e50)
MOD = int(1e9)+7 # 10^9 + 7

# field[H][W]
def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]

########

def main():
    A, B, C =l_inpl()
    print(max(C-(A-B), 0))

if __name__ == "__main__":
    main()

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())
print(c - min(c,a-b))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int, C: int):
    print(max(C-(A-B), 0))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    solve(A, B, C)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    A, B, C = MAP()
    print(max(C - (A - B), 0))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

rest = a - b
c -= rest
c = max(c, 0)

print(c)

Submission status: Accepted

Solution code:
A, B, C = [int(i) for i in input().split()]
result = C - (A - B)
if result < 0:
    result = 0
print(result)

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())

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

Submission status: Accepted

Solution code:
from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
import heapq as hq; import itertools as its; import operator as op


# globals
inf = float('inf')
input = stdin.readline


def main():
    a, b, c = get_li()
    print(max(0, c - (a - b)))
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def gets(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    setrecursionlimit(4100000)
    main()

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inf = [int(i) for i in input().split()]

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

print(max(C-(A-B), 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())
D = A - B
if D >= C:
    print(0)
else:
    print(C - D)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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:
a,b,c = map(int, input().split())
if a-b >= c:
    print(0)
else:
    print(c-(a-b))

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b = map(int, input().split())
# s = input()


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

Submission status: Accepted

Solution code:
x,y,z = map(int,input().split())

s = x-y

print(max(0, z-s))

Submission status: Accepted

Solution code:
#import sys
#input = sys.stdin.readline
def main():
    a, b, c = map( int, input().split())
    if c <= a-b:
        print(0)
    else:
        print(c-(a-b))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  A, B, C = readInts()
  print(max(0, C - (A - B)))

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
import math

#n = int(input())
a, b, c = [int(i) for i in input().split()]
#table = [[int(i) for i in input().split()] for j in range(n)]
#table = [list(input()) for n in range(h)]
#list = [int(i) for i in input().split()]
#num = [int(i) for i in range(n)]
#s = [input() for i in range(n)]
#s = input()
#list = list(s)
#temp = [[0 for _ in range(13)] for _ in range(13)]

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

Submission status: Accepted

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

room = A-B

res = max(0,C-room)

print(res)

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    
    a, b, c = map(int, input().split())
    diff = a - b
    print(max(0, c - diff))
    
    return 0

main()

Submission status: Accepted

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

Submission status: Accepted

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

ans = B+C-A

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
num = input().split()
if int(num[0])-int(num[1])<int(num[2]):
	print(int(num[2])-int(num[0])+int(num[1]))
else:
  print('0')

Submission status: Accepted

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

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

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 = [int(i) for i in input().split()]
print(max(0, c - (a - b)))

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())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
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 I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b,c=LI()
  a-=b
  return max(0,c-a)

# main()
print(main())

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A
    
if __name__ == '__main__':
    A, B, C = InputToInt()
    print(max(0, B+C-A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

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

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())
d = min(a - b, c)
print(c - d)

Submission status: Accepted

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


if __name__ == '__main__':
    a, b, c = map(int, input().split(' '))
    print(max(0, c - (a - b)))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
a,b,c = [int(i) for i in input().split()]
d = a-b
print(max(0,c-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:
# @author 

import sys

class ATransfer:
    def solve(self):
        a, b, c = [int(_) for _ in input().split()]
        print(max(0, c - (a - b)))

solver = ATransfer()
input = sys.stdin.readline

solver.solve()

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:
def get_numbers():
    return map(int, input().split())


a, b, c = get_numbers()

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A,B,C=MI()
    print(max(0,C-(A-B)))
if __name__ == '__main__':
    main()

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(c - min(c, a - b))

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa == x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))


l = l()


print(max(l[2]-(l[0]-l[1]),0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B, C = MAP()

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

Submission status: Accepted

Solution code:
A,B,C = [int(x) for x in input().split()]
x = max(C-A+B,0)
print(x)

Submission status: Accepted

Solution code:
import numpy as np

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int, C: int):
    print(max(C-(A-B),0))

    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    solve(A, B, C)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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 = map(int,input().split())
d = a-b
c-=d
print(max(c,0))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#!/usr/bin/env pypy3

from math import *

def main():
    import sys
    sys.dont_write_bytecode = True
    sys.setrecursionlimit(10000000)

    input = sys.stdin.readline

    #import numpy as np
    #import scipy as sp

    # Python 3 modules: https://docs.python.org/3/library/

    import os
    import math, itertools, operator
    from math import factorial as fact
    from operator import itemgetter, attrgetter
    from itertools import permutations, combinations
    from functools import reduce, lru_cache
    # Use scipy for stats: https://docs.scipy.org/doc/scipy/reference/stats.html
    # Before Python 3.5.  Import from math after it.
    from fractions import gcd
    from fractions import Fraction as Frac

    inf = float('inf')
    pow = __builtins__.pow

    def lcm(a, b):
        return a * b // gcd(a,b)

    def perm(a, b):
        import scipy.special
        return scipy.special.perm(a, b, exact = True)

    def comb(a, b):
        import scipy.special
        return scipy.special.comb(a, b, exact = True)

    def dfact(n):
        import scipy.special
        return scipy.special.factorial2(n, exact = True)

    def prod(l):
        return reduce(operator.mul, l)

    def input_ints(func = input, sep = None, conv = int):
        return list(map(conv, func().split(sep = sep)))

    if os.environ.get('GOROOT') is None:
        def dprint(*args, **kwargs):
            kwargs['file'] = sys.stderr
            import inspect
            frame = inspect.currentframe().f_back
            print('[' + os.path.basename(frame.f_code.co_filename)
                    + ':' + str(frame.f_lineno) + ']', *args, **kwargs)
    else:
        def dprint(*args, **kwargs):
            pass


    ############################################################################


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


if __name__ == '__main__':
    main()

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:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(A: int, B: int, C: int):
    print(C - min(A-B, C))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    solve(A, B, C)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

# S = input()
# N = int(input())
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())
ato = a - b
print(max(0, c - ato))

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())
print(max(0,C-(A-B)))

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())
d=a-b
print(max(0,c-d))

Submission status: Accepted

Solution code:
#### import ####
import sys
import math
from collections import defaultdict

#### 設定 ####
sys.setrecursionlimit(10**7)

#### 定数 ####
mod = 10**9 + 7

#### 読み込み ####
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))

#################

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

Submission status: Accepted

Solution code:
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

A, B, C = list(map(int, sys.stdin.readline().split()))
ans = max(0, C - (A - B))

print(ans)

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 = (int(_) for _ in input().split())

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res

def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    a,b,c = LI()
    c -= a-b
    print(max(0,c))
    return

#B
def B():

    return

#C
def C():

    return

#D
def D():

    return

#E
def E():

    return

#F
def F():

    return

#Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int, C: int):
    ret = max(0, C - (A - B))
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    solve(A, B, C)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
//using T = tuple<string, int, int>;

int main() {
  int A,B,C;
  cin >> A >> B >> C;
  cout << max(C-(A-B), 0) << endl;

  return 0;
}

// https://github.com/atcoder/live_library

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = int(input("A"))
B = int(input("B"))
C = int(input("C"))

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

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(1, N + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:


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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=a-b
e=c-d
if 0>=e :
    print("0")
else:
    print(e)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
A,B,C = map(int,input().split())
if not ( 1 <= B <= 20 and B <= A <= 20 ): sys.exit()
if not ( 1 <= C <= 20 ): sys.exit()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#c-(a-b)
print(max(-1*int(input())+int(input())+int(input()),0))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();
		if(a > b + c) {
			System.out.println("0");
		}
		else{
			System.out.println((b + c) -a  );		}


	}

}

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    h = list(map(int, input().split()))

    pre = 0
    flag = True
    for i in range(n):
        if h[i] - 1 >= pre:
            h[i] -= -1
        if h[i] < pre:
            flag = False
            break
        pre = h[i]
    
    if flag:
        print('Yes')
    else:
        print('No')
                

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

if n == 1:
  print('Yes')
  exit(0)

s[0] = s[0] - 1
for i in range(n-1):
  if s[i] > s[i+1]:
    print('No')
    exit()

  if s[i] < s[i+1] - 1:
    s[i+1] = s[i+1] - 1

print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin

A, B, C  = map(int, stdin.readline().rstrip().split())
print str(max(0, C - (A - B)))

Submission status: Runtime Error

Solution code:
from sys import stdin

A, B, C = map(int, stdin.readline().rstrip().split())
print str(max(0, C - (A - B)))

Submission status: Runtime Error

Solution code:
print input()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
print raw_input()

Submission status: Runtime Error

Solution code:
print raw_input()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if A - B > C:
  print 0

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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