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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():

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

	print(c-a+b)


 
if __name__ == '__main__':
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(C-(A-B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# 残り入る量
d = a -b

print(c -d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

else:
    print(c - b + a)

Submission status: Wrong Answer

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

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

else:
    print(b - a)

Submission status: Wrong Answer

Solution code:
# abc 136
input_list = list(map(int,input().split()))
print(input_list[2] + input_list[1] - input_list[0])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

def main():
    children = input()

    num_children = len(children)
    ret = {i: 0 for i in range(num_children)}

    previous_L = -1
    loop_flag = True
    for i, child in enumerate(children):
        if loop_flag:
            if child == 'L':
                if i != num_children - 1:
                    ret[i] = (i - previous_L + 1) // 2
                    ret[i - 1] = (i - previous_L) // 2
                    loop_flag = False
                    previous_L = i
                else:
                    if i != previous_L + 1:
                        ret[i] += 1
                        ret[i - 1] += 1
                        
        else:
            if child == 'L':
                if (i - previous_L) % 2:
                    ret[previous_L - 1] += 1
                else:
                    ret[previous_L] += 1
            else:
                loop_flag = True
                previous_L = i - 1

    ret = [str(value) for value in ret.values()]       
    ret = ' '.join(ret)
    print(ret)
    
if __name__=="__main__":
    main()

Submission status: Wrong Answer

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

print(b+c-a)

Submission status: Wrong Answer

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

print(c-a+b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print('No')

Submission status: Wrong Answer

Solution code:
print('Yes')

Submission status: Wrong Answer

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

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

print(c - (a - b))

Submission status: Wrong Answer

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

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

print(str(c))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input().split(' ')
A = int(N[0])
B = int(N[1])
C = int(N[2])
x = A -B
result = C - x
print(result)

Submission status: Wrong Answer

Solution code:
mizu = list(map(int, input().split(' ')))
A , B , C = mizu[0] , mizu[1] , mizu[2]
if A - (B + C) >= 0:
    print(A - (B + C))
else:
    print((A - (B + C)) * -1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def water_calc(A,B,C):
  answer = C-(A-B)
  if answer<0:
    answer=0
  print(int(answer))

Submission status: Wrong Answer

Solution code:
def main():

    i = list(map(int, input().split()))
    a = i[0]
    b = i[1]
    c = i[2]

    if  not (1 <= b and b <= a and a <= 20 and 1 <= c and c <= 20):      
        return

    k = c - a + b

    print(k)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():

    i = list(map(int, input().split()))
    a = i[0]
    b = i[1]
    c = i[2]

    if(1 <= b and b <= a and a <= 20 and 1 <= c and c <= 20):        

        k = c - a + b

        print(k)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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


#容器1に残りどの位の容量があるか。
D = A-B

#容器1の残量から容器の2の残量を差し引くとの残りのCの残量がある。
E = D-C

if E>=0:
    print(E)
else:
    print("0")

Submission status: Wrong Answer

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


#容器1に残りどの位の容量があるか。
D = A-B


E = D-C

print(E)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(c - (a - b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if A - B >= C:
  print(C)
elif C > A - B:
  print(A - B)

Submission status: Wrong Answer

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

t = (b+c)-a

print(t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(c-(a-b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, c = (int(i) for i in input().split())
anser = a - b
ansera= c - anser
print(ansera)

Submission status: Wrong Answer

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

for i in range(1,B+C):
    if A >= B + C:
        print(answer)
    elif  A != B:
        B += 1
    elif A == B:
        answer = C - i+1
        print(answer)
        exit()

Submission status: Wrong Answer

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

for i in range(1,B+C):
    if A >= B + C:
        print(answer)
    elif  A != B:
        B += 1
    elif A == B:
        answer = C - i+1
        print(answer)

Submission status: Wrong Answer

Solution code:
#Time up and try
A,B,C = map(int,input().split())
answer = 0

for i in range(1,B+1):
    if  A != B:
        B += 1
    elif A == B:
        answer = C - i+1
        print(answer)
        exit()

Submission status: Wrong Answer

Solution code:
#Time up and try
A,B,C = map(int,input().split())
answer = 0

for i in range(1,B+1):
    if  A != B:
        B += 1
    elif A == B:
        print(i)
        answer = C - i+1
        print(answer)
        exit()

Submission status: Wrong Answer

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

1<=B<=A<=20
1<=C<=20

print(C-(A-B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    a,b,c = map(int, input().split())
    return c-(a-b)

if __name__ == '__main__':
    print(solve())

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

res = c - (a - b)
print(res)

Submission status: Wrong Answer

Solution code:
A,B,C = list(map(int,input().strip().split()))
s = A - B
a = C - s
print(a)

Submission status: Wrong Answer

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

if C <= A - B:
    ans = 0
else:
    ans = C - A - B

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

D=A-B

E=D-C

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
A,B,C=map(int,input().split())
print(C-(A-B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(c-a+b)

Submission status: Wrong Answer

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

print(int(C)-(int(A)-int(B)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


print(c-(a-b))

Submission status: Wrong Answer

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

print(C-(A-B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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



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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(C-(A-B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(c-a+b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(c-(a-b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print( C-(A-B) )

Submission status: Wrong Answer

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

print(C-(A-B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = a - b
z = c - x
print(str(z))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

limit = a - b
ans = c - limit

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(C+B-A)

Submission status: Wrong Answer

Solution code:
# -*- coding:utf8 -*-

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

Submission status: Wrong Answer

Solution code:
asize,bwater,cwater = map(int,input().split())

if bwater + cwater > asize:
    cnokori = asize - bwater -1
    print(cnokori)

else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

rest = a - b
ans = c - rest

print(ans)

Submission status: Wrong Answer

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

s = a-b

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

Submission status: Wrong Answer

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

s = a-c

if b-s < 0:
  print(b-s)
else:
  print(0)

Submission status: Wrong Answer

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

print(b-(a-c))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
vol1_total, vol1_now, vol2_now = map(int, input().split(" "))

vol1_available = vol1_total - vol1_now
vol2_remain = vol2_now - vol1_available
print(vol2_remain)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(C - (A - B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d = a-b

if d > c:
    print(c)
else:
    print(d-c)

Submission status: Wrong Answer

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

d = c-(a-b)

if d > 0:
    print(d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
v = [int(s) for s in input().split(" ")]
A = v[0]
B = v[1]
C = v[2]

print(C - A + B)

Submission status: Wrong Answer

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

ans = c - (a - b)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C=(int(i) for i in input().split(" "))
print(B+C-A)

Submission status: Wrong Answer

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

print( c - ( a - b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input()) + 'R'
rcnt = 0
lcnt = 0
flag = 0
ans = [0]*(len(s)-1)
rpos = 0
lpos = 0

for i in range(len(s)):
    if s[i] == 'R':
        if flag == 1:
            if rcnt % 2 == 0:
                ans[rpos] += rcnt//2
                ans[lpos] += rcnt//2
            else:
                ans[rpos] += rcnt//2 + 1
                ans[lpos] += rcnt//2
            if lcnt % 2 == 0:
                ans[rpos] += lcnt//2
                ans[lpos] += lcnt//2
            else:
                ans[rpos] += lcnt//2
                ans[lpos] += lcnt//2 + 1
            rcnt = 0
            lcnt = 0
        flag = 0
        rcnt += 1
        rpos = i
    elif s[i] == 'L':
        if flag == 0:
            lpos = i
        flag = 1
        lcnt += 1
print(*ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8
a, b, c = map(int, input().split())
print(min(c, c-(a-b)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(-(A - B - C))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
number = list(map(int,input().split()))
print(number[2]-number[0]+number[1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(a[2] - (a[0] - a[1]))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
a, b, c = map(int, input().split())

ans1 = a - b
ans2 = c - ans1

print(ans2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

A, B, C = list(map(int, sys.stdin.read().strip().split(" ")))
print(C - (A - B))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print (C-(A-B))

Submission status: Wrong Answer

Solution code:
a,b,c = map(int, input().split())
ans = 0
sumi = b+c

if sumi > a:
  ans = sumi - a

elif a > sumi:
  ans = a-sumi
  
print(ans)

Submission status: Wrong Answer

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

print(c-(a-b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X = C - (A - B)

print(X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(C - (A - B))

Submission status: Wrong Answer

Solution code:
# A:容器１の最大容量
# B:容器１に入っている現在の数量
# C:容器２に入っている現在の数量

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

to_A = A-B # Aに入れることが出来る数量

result = 0

if to_A < C:
    result = C - to_A
else :
    result = 0

print(result)

Submission status: Wrong Answer

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

re = a - b
res = c - re

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    a,b,c=map(int,input().split(' '))
    print(b+c-a)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(c-(a-b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input().split() # S = [A, B, C]


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

cup1_capacity = int(A)
cup1_containing = int(B)
cup2_containing = int(C)


water_moved_from_cup2_to_cup1 = cup1_capacity - cup1_containing
cup2_remaining = cup2_containing - water_moved_from_cup2_to_cup1

print(cup2_remaining)

Submission status: Wrong Answer

Solution code:
S = input().split() # S = [A, B, C]

# ==== ここまで問題設定を変数に ===

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

cup1_capacity = int(A)
cup1_containing = int(B)
cup2_containing = int(C)

# === 解く ===

water_moved_from_cup2_to_cup1 = cup1_capacity - cup1_containing
cup2_remaining = cup2_containing - water_moved_from_cup2_to_cup1

print(cup2_remaining)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(N[2]-(N[0]-N[1]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
print(C-(A-B))

Submission status: Wrong Answer

Solution code:
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
youki1 = B
youki2 = C
youki21 = A-B
youki2 = youki2 - youki21
print(youki2)

Submission status: Wrong Answer

Solution code:
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
youki1 = B
youki2 = C
youki21 = A-B
youki2 = youki2 - youki21

Submission status: Wrong Answer

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

y=[0]*3

for i in range(3):
  y[i]=int(x[i])
  
ans=(y[2]-(y[0]-y[1]))

if ans>0:
  print(ans)
  
elif ans<0:
    print(0)

Submission status: Wrong Answer

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

y=[0]*3

for i in range(0,3):
  x[i]=int(x[i])
  
ans=(x[2]-(x[0]-x[1]))

if ans>0:
  print(ans)
  
elif ans<0:
    print(0)

Submission status: Wrong Answer

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

y=[0]*3

for i in range(3):
  y[i]=int(x[i])
  
ans=int(y[2]-(y[0]-y[1]))

if ans>0:
  print(ans)
  
elif ans<0:
  print(0)