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:
A, B, C = map(int, input().split())


H = C-(A-B)

if H < 0:
    print("0")
else:
    print(H)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Transfer
a, b, c = map(int, input().split())
r = c - (a - b)
if r < 0:
    r = 0

print (r)

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
from sys import stdin
def ii(): return int(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def li(): return list(mi())
a, b, c=mi()
c+=b-a
print(max(0, c))

Submission status: Accepted

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

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 = [int(x) for x in 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())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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()]#WideIntPoint
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)]#HeightString
def mi(n): return [wi() for _ in range(n)]#MatrixInt
def num__grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]#NumberGrid
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))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

# 入力値
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)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

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

Submission status: Accepted

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

ans = int(0)

ans = c-(a-b)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B, C = map(int, input().split())
print(max((C - A + B), 0))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = map(lambda x: int(x), 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 = 0
e = c - ( a - b )
if a - b > c:
  print (d)
else:
  print (e)

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().split(' ')))

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

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 B+C >= A:
  print(B+C-A)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a-b >= c:
    cup2 = 0

else: 
    cup2 = c - (a-b)

print(cup2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
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())
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 a-b > c:
  print(0)
else:
  print(c-a+b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = [int(i) for i in input().split()]
print(C-min(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())
D=B+C-A
if D<=0:
  print(0)
else:
  print(D)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8
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())
result = c-a+b
if result >= 0:
    print(result)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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=(int(x) for x in input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
S = C - A + B
if S > 0:
  print(S)
else:
  print("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:
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))

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b,c = map(int, raw_input().split())

# box1 の許容容量
tmp = a - b
rest = c - tmp

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

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:
#!/bin/python3
 
import os
import sys


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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

get = A - B

i = C - get

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b, c = map(int, input().split())
free_space = a - b
if free_space >= c:
    print(0)
else:
    print(c - free_space)

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

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

Submission status: Accepted

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

    print(result)

if __name__ == "__main__":
    main()

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B, C = list(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):
    print("0")
else:
    print(C-(A-B))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

cap = A - B

ans = C - cap

if ans < 0:
    ans = 0

print(ans)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

# スペース区切りの整数の入力
a, b, c = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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):
        # cannot down
        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()
        # solve_b()
        # solve_c()

Submission status: Accepted

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

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 B + C > A:
    print(B + C - A)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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')

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

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

#C
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

#D
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

#E
def E():
    return

#F
def F():
    return

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