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: Runtime Error

Solution code:
N = int(input())
H_list = list(map(int,input().split()))
Flag = False
if N == 1:

    print("Yes")
    
else:
    for i in range(N):
        if H_list[N-1-i-1] - H_list[N-1-i] > 1:
            print("No")
            break
        elif H_list[N-1-i-1] - H_list[N-1-i] == 1:
            H_list[N-1-i-1] = H_list[N-1-i-1] -1
        else:
            continue
     
Flag = True

if Flag == True:
    print("Yes")

Submission status: Runtime Error

Solution code:
a = []
a = input().split()

A = int(a[0])
B = int(a[1])
C = int(a[2])

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

Submission status: Runtime Error

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

c = 0
for i in range(a):
  if i>0:
    if (int(b[i-1]) - int(b[i])>1):
      c=1
if c==1:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

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)a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
print(C-(A-B))

Submission status: Runtime Error

Solution code:
N=int(input())

ANS=[0]*5
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N%10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

Submission status: Runtime Error

Solution code:
N=int(input())

ANS=[0]*5
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N/10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

Submission status: Runtime Error

Solution code:
N=int(input())

ANS=[0]*6
flag=0

if N<100000:
    if N<10000:
        if N<1000:
            if N<100:
                if N<10:
                    ANS[0]=int(N/10)
                    flag=flag+1
                ANS[1]=9
                flag=flag+1
            ANS[2]=9+N-100+1
            flag=flag+1
        ANS[3]=909
        flag=flag+1
    ANS[4]=9+900+N-10000+1
    flag=flag+1
elif N==100000:
    ANS[5]
    print(90909)

if flag==5:
    print(ANS[0])
if flag==4:
    print(ANS[1])
if flag==3:
    print(ANS[2])
if flag==2:
    print(ANS[3])
if flag==1:
    print(ANS[4])

Submission status: Runtime Error

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

for i in range(3):
  y[i]=int(x[i])

y=[0]*3
ans=(y[2]-(y[0]-y[1]))

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

Submission status: Runtime Error

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

y=[0]*3

for i in range(3):
  y[i]=int(x[i])

if ans>y[2]-(y[0]-y[1]):
  print(ans)
  
elif ans<y[2]-(y[0]-y[1]):
    print(0)

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
import sys
 
argv=sys.argv
 
x=[0]*3
for i in range(3):
	x[i]=(int)(argv[i+1])
    
print(x[2]-(x[0]-x[1]))

Submission status: Runtime Error

Solution code:
def resolve():
    a, b, c = map(int, input())
    return c - a + b
  
resolve()

Submission status: Runtime Error

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

for i in range(N-1):
    if H[i]>H[i+1]:
        H[i]=H[i]-1
        # if H[i] > H[i + 1]:
        #     A = "no"
        #     break
        # else:
        #     A="yes"



for i in range(N-1):
    if H[i]>H[i+1]:
        A="no"
        break
    else:
        A="yes"

print(A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

ans = c - (a - b)

if ans < 0:
    ans = 0

print(ans)

Submission status: Runtime Error

Solution code:
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers > 0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
x = a + b
y = a-b
z = a* b
print(max(x,y,z))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
if 1<=N and N<10:
	print(N)
elif 10<=N and N<100:
	print("9")
elif 100<=N and N<1000:
	print(9+N-99)
elif 1000<=N and N<10000:
	print("909")
elif 10000<=N and N<100000:
	print(909+N-999)
else:
	print("90909")

Submission status: Runtime Error

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

A = num[0]
B = num[1]
C = num[2]
 
temp = C - (A - B)
if temp < 0:
  temp = 0
  
print(temp)

Submission status: Runtime Error

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

ans=0

if A-B<C:
    ans=C-(A-B)

print(ans)

Submission status: Runtime Error

Solution code:
if (A-B)>C:
  return 0
else:
  return C-(A-B)

Submission status: Runtime Error

Solution code:
n = int(input())
res = 0
keta = 1
for i in range(1, n+1):
  if i % (10 ** keta) == 0:
    keta += 1
  if keta % 2 == 1:
    res += 1
print(res)

Submission status: Runtime Error

Solution code:
def water(A,B,C):
  	if A-B>=c:
      	return 0
    else:
        return C-A+B

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=input().split(" ")
f=[]
if a>=3:
    for p in range (0,a-2):
        if int(b[p])-int(b[p+1])>1:
            f.append("miss")
        elif int(b[p])-int(b[p+1])==1:
            if int(b[p+1])-int(b[p+2])==1:
                f.append("miss")
    if int(b[a-2])-int(b[a-1])>1:
        f.append("miss")
elif a=3:
    if int(b[0])-int(b[1])>1:
        f.append("miss")
    elif int(b[1])-int(b[2])>1:
        f.append("miss")
    elif int(b[0])-int(b[2])>1:
        f.append("miss")
elif a=2:
    if int(b[0])-int(b[1])>1:
        f.append("miss")

if "miss" not in f:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
 
c_final = C - (A - B)
 
if c_final <=0:
  print("0")
else:
  print(c_final)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())

c_final = c - (a - b)

if c_final <=0:
  print("0")
else:
  print(c_final)

Submission status: Runtime Error

Solution code:
N = input()
H = input()

N = int(N)
H = [int(x) for x in H.split(" ")]
C = 0
R = 0
m = min(H[0], H[1])

while C < (N-1):
    if H[C] - H[C+1] > 1:
        R = 1
        C = N
    elif H[C] - H[C+1] == 1:
        if m > (H[C]-1):
            R = 1
            C = N
        else:
            m = min(m, H[C]-1)
            C += 1
    else:
        C+=1

if R == 0:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a = input(int())
b = input(int())
c = input(int())

c_final = c - a -b

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = input().split(' ')
a, b, c = x[0], x[1], x[2]
ans = c - (a-b)
if ans > 0:
  print(ans)
else:
  print(0)

Submission status: Runtime Error

Solution code:
x = input().split(' ')
a, b, c = x[0], x[1], x[2]
ans = c - (a-b)
if ans > 0:
  print(ans)
else:
  print 0

Submission status: Runtime Error

Solution code:
x = input().split(' ')
a, b, c = x[0], x[1], x[2]
ans = c - (a-b)
if c > 0:
  print(c)
else:
  print(0)

Submission status: Runtime Error

Solution code:
x = input().split(' ')
a, b, c = x[0], x[1], x[2]
ans = c - (a-b)
if c > 0:
  print(c)
else:
  print 0

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define maxn 1000005
using namespace std;
int a,b,c;

int main()
{
  cin>>a>>b>>c;
  int xx = a - b;
  cout<<c - xx<<endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
x = B + C - A
if x < 0:
  x = 0

Submission status: Runtime Error

Solution code:
n=input()
n=int(n)
input_h=input().split()# 2 4 5のような入力
input_h=[int(num) for num in input_h]#intへ変換

for idx in range(n-1):

    if input_h[idx]<=input_h[idx+1]:
        continue
    elif input_h[idx]-1==input_h[idx+1]:
        continue
    else:
        print("No")
        break
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
n=input()
n=int(n)
input_h=input().split()# 2 4 5のような入力
input_h=[int(num) for num in input_h]#intへ変換

for idx in range(n-1):

    if input_h[idx]<=input_h[idx+1]:
        continue
    elif input_h[idx]-1==input_h[idx+1]:
        continue
    else:
        print("No")
        break
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
N = int(input())

if N < 10:
    print(N)
elif 10 <= N and N < 100:
    print(9)
elif 100 <= N and N < 1000:
    print(N-90)
elif 1000 <= N and N < 10000:
    print(909)
elif 10000 <= N and N < 100000:
    print(N-9090)
elif 100000 == N:
    print(90909)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = map(int, input().split())
x[0] = -1*x[0]
print(sum(x))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
 
for i in range(1,n+1):
  if len(int(i))//2 == 1:
    count += 1
 
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
 
for i in n:
  if len(i)%2 != 0:
    count += 1
 
print(count)

Submission status: Runtime Error

Solution code:
import sys
 
stdin = sys.stdin
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces
 
n, k = na()
a = na()
 
q = sum(a)
 
# min(a%d, d-a%d)
ds = set()
x = 1
while x*x <= q:
    if q % x == 0:
        ds.add(x)
        ds.add(q//x)
    x += 1
 
ans = 0
for d in ds:
    costs = []
    for v in a:
        costs.append(v%d)
 
    costs.sort()
    cost = 0
    if costs[-1] > 0:
        sc = sum(costs)
        ps = 0
        for i in range(n):
            ps += costs[i]
            tps = d*(n-i-1) - (sc - ps)
            if ps == tps:
                cost = ps
                break
 
    if cost <= k:
        ans = max(ans, d)
 
print(ans)

Submission status: Runtime Error

Solution code:
x = int(input())
 
if x <=9:
  print(x)
elif x<=99:
  print(9)
elif x<=999:
  print(9+(x-99))
elif x<=9999:
  print(909)
elif x<=99999:
  print(909+(x-9999))
elif x ==100000:
  print(90909)

Submission status: Runtime Error

Solution code:
x = int(input())

if x <10:
  print(x)
elif x<99:
  print(9)
elif x<999:
  print(9+(x-99))
elif x<9999:
  print(909)
elif x<99999:
  print(909+(x-9999))
elif x==100000:
  print(90909)

Submission status: Runtime Error

Solution code:
x = int(input())

if x <10:
  print(x)
elif x<99:
  print(9)
elif x<999:
  print(9+(x-99))
elif x<9999:
  print(909)
elif x<99999:
  print(909+(x-9999))
else:
  print(90909)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

C =- (A - B)
print(C)

Submission status: Runtime Error

Solution code:
A = imput()
B = imput()
C = imput()

C =- (A - B)
print(C)

Submission status: Runtime Error

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

X = C - (A - B)
print(X)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Aug  8 23:12:25 2019

@author: kohei
"""

N = input()

A = N.split()[0]
B = N.split()[1]
C = N.split()[2] 

print(C-A+B)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()

count = 1
answer = [0] * len(S)
# RLの切り替わるインデックスをマーク
n = 0
for i in range(len(S) - 1):
    if (S[i] == S[i + 1]):
        count += 1
    else:
        if (S[i + 1] == 'R'):
            # Lを割り振る
            answer[n] += count // 2
            answer[n + 1] += -(-count // 2)
            count = 1
        else:
            # Rを割り振る
            answer[i] += -(-count // 2)
            answer[i + 1] += count // 2
            count = 1
            n = i
    # 右端のLを割り振る
    if (i == len(S) - 2):
        answer[n] += count // 2
        answer[n + 1] += -(-count // 2)

for c in answer:
    print(f"{c} ", end='')
print()

Submission status: Runtime Error

Solution code:
n = int(input())
if n < 10:
	print(n)
elif n < 100:
	print(9)
elif n < 1000:
	print(9 + n - 99)
elif n == 1000:
	print(909)
elif n < 10_000:
	print(909)
elif n == 10_000:
	print(910)
elif n < 100_000:
	print(909 + n-9999)
elif n == 100_000:
	print(90909)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
a, b, c = map(int, input().split())
# 文字列の入力
s = input()
# 出力
print("{}".format(c-(a-b)))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b, c = map(int, input().split())
print("{}".c-(a-b))

Submission status: Runtime Error

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

N = int(input())
H = list(map(int, input().split()))

max = 0
ans = "Yes"
for i in range(N):
    if max - H[i] > 1:
        ans = "No"
        break
    max = max(max, H[i])

print(ans)

Submission status: Runtime Error

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

N = int(input())
H = list(map(int, input().split()))

max = 0
ans = "Yes"
for i in range(N-1):
    if max - H[i] > 1:
        ans = "No"
        break
    max = max(max, H[i])
    
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

N = int(input())
H = list(map(int, input().split()))
H_bak = copy.copy(H)

while H != sorted(H):
    for i in range(N-1):
        while H[i] > H[i+1]:
            H[i] -= 1

if all([abs(H[i]-H_bak[i]) < 2 for i in range(N)]):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
A = int(sys.argv[1])
B = int(sys.argv[2])
C = int(sys.argv[3])
if C - (A - B) >= 0:
    print(C - (A - B))
else:
    print(0)

Submission status: Runtime Error

Solution code:
A = int(print())
B = int(print())
C = int(print())

dAB = abs(A-B)
rC = C-dAB
print(rC)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A_=input(A?)
B_=input(B?)
C_=input(C?)
s=C_-A_+B_
print(s)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

A=int(A)
B=int(B)
C=int(C)

while B<A:
    B=B+1
    C=C-1
    if C==0:
        break

print(C)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(range(n))
b=0
for i in range(n):
  if len(str(a[i]))%2==1:
    b+=1
print(b)

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
1<=B<=A<=20
1<=C<=20
D = A-B
if D>C:
    E = C-C
else:
    E = D-C

E

Submission status: Runtime Error

Solution code:
A B C
D = B-A
E = C-D
E

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
H = map(int, input().split())
H = list(H)
res = 'Yes'
for i in range(len(H) - 1):
  for j in range(i + 1, len(H)):
    if H[i] - H[j] >= 2:
      res = 'No'
      break
  if res == 'No':
    break
print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())

if N < 10:
  print(N)
elif N < 100:
  print(9)
elif N < 1000:
  print(9+ N-99)
elif N < 10000:
  print(909)
elif N < 100000:
  print(909 + N - 9999)
else:
  print(90909)

Submission status: Runtime Error

Solution code:
N=int(input())
 
if N < 10:
  print(N)
  
elif N < 100:
  print(9)

  
elif N < 1000:
  print(9+ N-99)
  
  
elif N < 10000:
  print(909)
  
elif N < 100000:
  print(909 + N - 9999)

else:
  print(90909)

Submission status: Runtime Error

Solution code:
N=int(input())

if N < 10:
  print(N)
  
elif N < 100:
  print(9)
  
elif N < 1000:
  print(9+ N-99)
  
elif N < 10000:
  print(909)

elif N < 100000:
  print(909 + N - 9999)

else:
  print(90909)

Submission status: Runtime Error

Solution code:
N = int(input())

if N < 10:
  print(N)
  
elif N < 100:
  print(9)
  
elif N < 1000:
  print(9+ N-99)
  
elif N < 10000:
  print(909)

elif N < 100000:
  print(909 + N - 9999)

else:
  print(90909)

Submission status: Runtime Error

Solution code:
N = int(input())


if N < 10:
  print(N)
  
elif N < 100:
  print(9)
  
elif N < 1000:
  print(9+ N-99)
  
elif N < 10000:
  print(909)

elif N < 100000:
  print(909 + N - 9999)

else:
  print(90909)

Submission status: Runtime Error

Solution code:
N = int(input())


if N < 10:
  print(N)
elif N < 100:
  print(9)
elif N < 1000:
  print(9+ N-99)
  
elif N < 10000:
  print(909)

elif N < 100000:
  print(90909)

Submission status: Runtime Error

Solution code:
N = int(input())

num = 0
if N < 10:
  print(N)
elif N < 100:
  print(9)
elif N < 1000:
  print(9+ n-99)
  
elif N <10000:
  print(909)

elif N < 100000:
  print(90909)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
A, B, C = input()
 
D = A - B

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

Submission status: Runtime Error

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

D = A - B


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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#https://atcoder.jp/contests/abc136/tasks/abc136_a

print(' A = ')
A = input()
A =int(A)

print(' B = ')
B = input()
B =int(B)

print(' C = ')
C = input()
C =int(C)

if 1<=B<=A<=20 and 1<=C<=20:
    i=C-(A-B)
else:
    print('condition failed')

print('C have',i)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())

if N<10:
    print(N)
elif 10<=N and N<100:
    print(9)
elif 100<=N and N<1000:
    print(9+(N-99))
elif 1000<=N and N<10000:
    print(900+9)
elif 10000<=N and N<100000:
    print(909+(N-9999))
elif N==100000:
    print(90000+900+9)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
input()
vs=list(map(int, input().split(" ")))
k = 0
for i in range(0, len(vs)-1):
	if vs[i] - vs[i+1] >= 2:
		k = 100
		break
	if vs[i] - vs[i+1] == 1:
		k += 1
		if k >= 2:
			break
	elif vs[i+1] - vs[i] >= 1:
		k = 0
if k > 1:
	print("No")
else:
	print("Yes")

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
x=np.where(c-(a-b)>0,c-(a-b),0)

print(x)

Submission status: Runtime Error

Solution code:
a,b,c=int(input())
x=np.where(c-(a-b)>0,c-(a-b),0)

print(x)

Submission status: Runtime Error

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

c = 0
for i in range(n-1):
    if h[i] <= h[i+1]-1:
        h[i+1] = h[i+1]-1
    elif h[i] == h[i+1]:
        continue
    else:
        c = 1
if c == 1:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
vals = input().split()
dif = vals[0] - vals[1]
 
if dif >= vals[3]:
  print(0)
else:
  print(vals[3] - dif)

Submission status: Runtime Error

Solution code:
vals = input().split()
dif = vals[0] - vals[1]

if dif >= vals[3]:
  print 0
else:
  print vals[3] - dif

Submission status: Runtime Error

Solution code:
import fileinput

for line in fileinput.input():
    vals = line.split()
    print min(vals[0] - vals[1], vals[2])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

diff = a - b - c

if diff => 0:
  print(0)
else:
  print(-diff)

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:
N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
s = sum(A)
flag = False
def make_divisors(n):
    divisors = []
    for i in range(int(n**0.5), 0, -1):
        if n%i == 0:
            divisors.append(i)
            if i != n//i:
                divisors.append(n//i)
    return sorted(divisors, reverse=True)
divs = make_divisors(s)
for x in divs:
    if flag:
        break
    sortedA = sorted([a%x for a in A])
    sumA = sum(sortedA)
    index_len = len(sortedA)
    sump = 0
    for i, a in enumerate(sortedA):
        sump += a
        summ = x*(index_len - (i+1)) - (sumA - sump)
        if sump == summ and sump <= K:
            print(x)
            flag = True
            break

Submission status: Runtime Error

Solution code:
N = int (input())
H = list(map(int,input().split()))
ans = 'Yes'
for  i in range(N-1):
    diff = H[i+1] - H[i]
    if diff >= 1:
        H[i+1] -= 1
    elif diff < 0:
        ans ='No'
print(ans)

Submission status: Runtime Error

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

if n == 1:
    print('Yes')
elif h_max - 1 <= h[n-1]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
def main():
	dataList = input("input:").split(" ")
	a = dataList[0]
    b = dataList[1]
    c = dataList[2]
    return c - (a - b)
  
main()

Submission status: Runtime Error

Solution code:
N = int(input())
H = list(map(int, input().split()))
flag = 0
No = 0

for i in range(N-1):
    diff = H[i+1]-H[i]   
    
    if diff < -1 or (diff == -1 and flag ==1):
        No = 1
    elif diff == -1 and flag == 0:
        flug = 1
    elif diff > 0:
        flug = 0    
        
if No == 0: print("Yes")
else: print("No")

Submission status: Runtime Error

Solution code:
C2 = C - A + B
if C2 >= o;
	print(C2)
  elif C2 < 0;
  	print(C)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print("{}-{}+{}".format(c,a,b)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
inputs=list(map(int, input().split()))
print(f"{inputs[2] - min(inputs[0]-inputs[1], inputs[2])}")

Submission status: Runtime Error

Solution code:
n=int(input())
if n<10:
  print(n)
elif n<100:
  print(9)
elif n<1000:
  print(9+(n-99))
elif n<10000:
  print(909)
elif n<100000:
  print(909+(n-9999))
else:
  print(90909)

Submission status: Runtime Error

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

for i in range(N-1):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

for i in range(N-1):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

for i in range(N-2):

    if A[i] > A[i+1]:
        A[i] -= 1
        if A[i+1] >= A[i]:
            chinpo += 1
    else:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

for i in range(N-1):
    if A[i] >> A[i+1]:
        A[i] -= 1
    if A[i+1] >= A[i]:
        chinpo += 1

if chinpo == N-1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from heapq import heappush, heappop
from collections import deque
import itertools
from itertools import permutations
import sys
import bisect
sys.setrecursionlimit(10**6)
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
YNeos='YNeos'
GYN=['Yes','trumpet']
mo=10**9+7
imp='IMPOSSIBLE'

n,k=MI()
a=LI()
s=sum(a)
d=[1,s]
for i in range(2,int(s**0.5)+1):
    if s%i==0:
        d.append(i)
        if s//i!=i:
            d.append(s//i)

for i in d:
    if sum([a%i for j in a])!=0:
        continue
    else:
        x=[j%i for j in a]
        x.sort()
        for j in range(n-1):
            if 
        
for i in range(n):
    if a[i]<a[i+1]:
        a[i+1]-=1
    if a[i]<a[i+1]:
        print('No')
        exit()
print('Yes')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A, B, C = input().split()
 
answer = (B + C) % A
 
print(answer)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())

answer = (b + c) % a

print(answer)

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

Solution code:
N = int(input())
li = list(map(int,input().split()))
ans = "Yes"
b = 0
for i in range(N):
        b = max(b,li[i])
        if b > li[i]+1:
                ans = "No"
        

print(ans)

Submission status: Runtime Error

Solution code:

A=input()
B=input()
C=input()

diff=C-(A-B)

if diff>=0:
  print(diff)

if diff<0:
  print(0)