Harryxun/stf_run huggingface dataset:
import sys
n = int(input())
a = list(map(int, input().split(' ')))

a.sort()
a.append(-1)
counter = 0
b = []
for i in range(n+1):
    if a[counter] == a[i]:
        continue
    else:
        b.append([a[counter], i-counter])
        counter = i
odd = 0
if n%2 == 1:
    if b[0][0] == 0 and b[0][1] == 1:
        b[0][1] += 1
        n += 1
        odd = 1
    else:
        print(0)
        sys.exit()
if odd:
    for i in range(int(n//2)):
        if b[i][0] == i*2 and b[i][1] == 2:
            continue
        else:
            print(0)
            sys.exit()
else:
    for i in range(int(n//2)):
        if b[i][0] == i*2+1 and b[i][1] == 2:
            continue
        else:
            print(0)
            sys.exit()
if odd:
    print(int(2**(n/2 -1)))
else:
    print(int(2**(n/2)))

### FIXED CODE ###

import sys
n = int(input())
a = list(map(int, input().split(' ')))

a.sort()
if n%2 == 0:
    for i in range(n-1):
        if i%2 == 0:
            if a[i] == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
        else:
            if a[i]+2 == a[i+1]:
                continue
            else:
                print(0)
                sys.exit()
    result = 2 ** (n//2)
    print(result % (10**9+7))
else:
    if a[0] == 0:
        for i in range(1, n-1):
            if i%2 == 1:
                if a[i] == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
            else:
                if a[i]+2 == a[i+1]:
                    continue
                else:
                    print(0)
                    sys.exit()
        result = 2**((n-1)//2)
        print(result %(10**9+7))
    else:
        print(0)
        sys.exit()
a=input()
b=input()
if a>b
 print"a>b"
if a<b
 print"a<b"
else
 print"a=b"

### FIXED CODE ###

a, b = map(int, raw_input().split())
if a < b:
 print "a < b"
elif a > b:
 print "a > b"
else:
 print "a == b"
import bisect
def f(x,a):
  b = bisect.bisect_right(a,x)
  return True if x==a[max(0,b-1)] else False
MOD = 10**9+7
N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]
a.sort()
x = 0
y = 1
for i in range(N):
  if f(i,a) and f(i+1,a):
    print(0)
    exit()
  elif f(i+1,a):
    z = 0
  else:
    z = x + y
  x = y
  y = z
print(z%MOD)


### FIXED CODE ###

import bisect
def f(x,a):
  global M
  b = bisect.bisect_left(a,x)
  if x==a[min(b,M)]:
    return True
  else:
    return False
MOD = 10**9+7
N,M = map(int,input().split())
a = [-1]+[int(input()) for _ in range(M)]
a.sort()
x = 0
y = 1
for i in range(N):
  if f(i,a) and f(i+1,a):
    print(0)
    exit()
  elif f(i+1,a):
    z = 0
  else:
    z = x + y
  x = y
  y = z
print(z%MOD)
N,M = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
B = [list(map(int,input().split())) for _ in range(M)]
B = sorted(B,key=lambda x:x[1],reverse=True)
cur = 0
cnt = 0
for i in range(N):
    if cnt==B[cur][0]:
        cur +=1
        cnt = 0
    if B[cur][1]<=A[i]:
        break
    A[i] = B[cur][1]
    cnt += 1
print(sum(A))

### FIXED CODE ###

N,M = map(int,input().split())
A = list(map(int,input().split()))
A = sorted(A)
B = [list(map(int,input().split())) for _ in range(M)]
B = sorted(B,key=lambda x:x[1],reverse=True)
cur = 0
cnt = 0
for i in range(N):
    if cnt==B[cur][0]:
        cur +=1
        if cur==M:break
        cnt = 0
    if B[cur][1]<=A[i]:
        break
    A[i] = B[cur][1]
    cnt += 1
print(sum(A))
a, b, c = map(int, input().split())
if a, b, c == (5, 5, 7):
  print(YES)
elif a, b, c == (5, 7, 5):
  print(YES)
elif a, b, c == (7, 5, 5):
  print(YES)
else:
  pring(NO)

### FIXED CODE ###

a, b, c = map(int, input().split())
if (a, b, c) == (5, 5, 7):
  print("YES")
elif (a, b, c) == (5, 7, 5):
  print("YES")
elif (a, b, c) == (7, 5, 5):
  print("YES")
else:
  print("NO")
# -*- coding: utf-8 -*-


def sum_and_average(_input):
    _sum_list = []
    _avg_list = []

    while 1:
        try:
            _sum, _avg = [int(e) for e in _input]
            _sum_list.append(_sum)
            _avg_list.append(_avg)
        except EOFError:
            break
    return sum(_sum_list), (sum(_avg_list) / len(_avg_list))

if __name__ == '__main__':
    _sum, _avg = sum_and_average(input().split())
    print(round(_sum, 1), round(_avg, 1))

### FIXED CODE ###

# -*- coding: utf-8 -*-

_sum = 0
_avg = 0
n = 0


while 1:
    try:
        _s, _a = [int(e) for e in input().split(',')]
        _sum += _s * _a
        _avg += _a
        n += 1
    except:
        print(_sum)
        print(int(_avg / n + 0.5))
        break
a,b,c=input().split()
if a >= c:
  print(a-c,b)
else:
  print(0,max(a+b-c,0))

### FIXED CODE ###

a,b,c=map(int,input().split())
if a >= c:
  print(a-c,b)
else:
  print(0,max(a+b-c,0))
import networkx as nx
n,m=map(int,input().split())
s=[list(map(int,input().split())) for _ in range(m)]
g=nx.Graph()
g.add_edges_from(s)
 
#各部屋の通じてる部屋番のリストを作る
l=[[] for _ in range(n)]
for i in range(m):
    a,b=s[i][0],s[i][1]
    l[a-1].append(b)
    l[b-1].append(a)
#深さのリストを作る
l1=sum(l, []) #一次元化
l1.insert(0,1)
l_depth=list(dict.fromkeys(l1))#深さのリスト
 
# スタート地点からゴール地点までのすべての単純路 (同じ頂点を通らないパス)
k=list(nx.all_simple_paths(G, source=1, target=l_depth[-1]))
 
c=0
ma=0
for i in range(len(k)):
    if len(k[i])>ma:
        ma=len(k[i])
        c-=c+1
    elif len(k[i])==ma:
        c+=1
print(c)

### FIXED CODE ###

n,m=map(int,input().split())
s=[list(map(int,input().split())) for _ in range(m)]

#各部屋の通じてる部屋番のリストを作る
l=[[] for _ in range(n)]
for i in range(m):
    a,b=s[i][0],s[i][1]
    l[a-1].append(b)
    l[b-1].append(a)

def dfs(now, prev, visited):
    visited.append(now)#行った頂点を追加していって全て行ったなら+1
    if len(visited) == n:
        return 1
 
    ret = 0 #条件を満たす数の初期値
    for edge in l[now-1]:#今の場所からいける頂点がまだ行ったことのない場合そこを同様に再度探索
        if edge == prev:
            continue
        if edge in visited:
            continue
 
        ret += dfs(edge, prev, visited[:])#そこで全ての頂点を網羅したなら+1(dfs文最初の部分)
 
    return ret #総計値を返す

print(dfs(1, 0, []))
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))

ans=0

for x,y in zip(a,a[1:]):
  if y == x+1:
    ans += c[x-1]
    
print(sum(y)+ans)

### FIXED CODE ###

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

ans=0

for x,y in zip(a,a[1:]):
  if y == x+1:
    ans += c[x-1]
    
print(sum(b)+ans)
print(x**3)

### FIXED CODE ###

num = input()
num = int(num)
print(num**3)
import math
 
a, b = map(str, input().split())
input = int(a + b)

for i in range(1000):
  if input == i**2 :
  	print('Yes')
    break   

print('No')

### FIXED CODE ###

import math, sys
 
a, b = map(str, input().split())
input = int(a + b)

for i in range(1000):
  if input == i**2 :
    print('Yes')
    sys.exit(0)

print('No')
S=input()
T=input()
ans=0
for i in range(3):
	if S[i] == T[i]:
  	ans += 1
print(ans)

### FIXED CODE ###

a = input()
b = input()
c = 0
for i in range(3):
  if a[i] == b[i]:
    c += 1
print(c)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
h,w = map(int,readline().split())

lst1 = [list(map(int,readline().split())) for i in range(h)]
ans = []
for i in range(h):
    for j in range(w-1):
        if lst1[i][j] %2 == 1:
            ans.append([i,j,i,j+1])
            lst1[i][j+1] += 1

for i in range(h-1):
    if lst1[i][-1] %2 == 1:
        ans.append([i,j,i+1,j])
        lst1[i+1][-1] += 1

print(len(ans))
for i in ans:
    print(i[0]+1,i[1]+1,i[2]+1,i[3]+1) 

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
h,w = map(int,readline().split())

lst1 = [list(map(int,readline().split())) for i in range(h)]
ans = []
for i in range(h):
    for j in range(w-1):
        if lst1[i][j] %2 == 1:
            ans.append([i,j,i,j+1])
            lst1[i][j+1] += 1

for i in range(h-1):
    if lst1[i][-1] %2 == 1:
        ans.append([i,w-1,i+1,w-1])
        lst1[i+1][-1] += 1

print(len(ans))
for i in ans:
    print(i[0]+1,i[1]+1,i[2]+1,i[3]+1)
D,N =map(int,input().split())
if D ==0:
    print(N)
elif D == 1 and N <100:
    print(N*100)
elif D ==1 and N ==100:
    print(N+1)*100

elif D == 2 and N <100:
    print(10000*N)
elif D == 2 and N==100:
    print(N+1)*100


### FIXED CODE ###

D,N =map(int,input().split())
if D ==0 and N <100:
    print(N)
elif D ==0 and N ==100:
    print(N+1)
elif D == 1 and N <100:
    print(N*100)
elif D ==1 and N ==100:
    print((N+1)*100)

elif D == 2 and N <100:
    print(10000*N)
elif D == 2 and N==100:
    print((N+1)*10000)
from collections import deque
S=deque(input())
Q=int(input())
for i in range(Q):
  N=list(input().split())
  if N[0]=="1":
    S.reverse()
  elif N[1]="1":#先頭にC1
    S.appendleft(N[2])
  else:
    S.append(N[2])
print(S)

### FIXED CODE ###

from collections import deque
S=deque(input())
Q=int(input())
F=0#フラグ
for i in range(Q):
  N=list(input().split())
  if F==0:#反転していない場合
    if N[0]=="1":#反転させる
      F=1
    elif N[1]=="1":#先頭に追加
      S.appendleft(N[2])
    else:#末尾に追加
      S.append(N[2])
  elif F==1:#反転している場合
    if N[0]=="1":#反転を戻す
      F=0
    elif N[1]=="1":#末尾に追加
      S.append(N[2])
    else:#先頭に追加
      S.appendleft(N[2])
if F==1:#反転するならsを反転させる
  S.reverse()
  print("".join(S))
else:#そうでないならそのまま
  print("".join(S))
a,b=map(int,input().split())
if a%2 != b%2 :
  	print('IMPOSSIBLE')
else
	k=(a+b)/2
  	print(k)

### FIXED CODE ###

a,b=map(int,input().split())
if a%2 != b%2:
	print("IMPOSSIBLE")
else:
	k=(a+b)//2
	print(k)
n,k=list(map(int,input().split()))
    a=list(map(int,input().split()))
    if k>n:
        k=n-1
    dp=np.array([int(0) for _ in range(n)])
    dp[1]=abs(a[0]-a[1])
     
    for i in range(2,n):
      ind = max(0,i-k)
      dp[i]=np.minimum(np.sum(dp[ind:i],abs(a[i]-a[ind:i])))
      #dp[i]=min(dp[i-1]+abs(a[i]-a[i-1]),dp[i-2]+abs(a[i]-a[i-2]))
    #print(dp[n-1])
    print(dp[-1])

### FIXED CODE ###

n,k=list(map(int,input().split()))
a=list(map(int,input().split()))
if k>n:
    k=n-1
dp=[int(0) for _ in range(n)]
dp[1]=abs(a[0]-a[1])
 
for i in range(2,n):
  ind = max(0,i-k)
  dp[i]=min([dp[v]+abs(a[i]-a[v]) for v in range(ind,i)])
  #dp[i]=min(dp[i-1]+abs(a[i]-a[i-1]),dp[i-2]+abs(a[i]-a[i-2]))
#print(dp[n-1])
print(dp[-1])
do run python3
n=4
stones=[10, 30, 40 ,20]
infini=(10**4)*(10**5)
dp = [infini for _ in range(n)]
dp[0]=0
dp[1]=stones[1]
for pos in range(2, n):
   dp[pos] = min(dp[pos], stones[pos] + min(dp[pos-1], dp[pos-2]))
print(dp[-1])

### FIXED CODE ###


n=int(input())
stones=list(map(int, input().split()))
infini=(10**4)*(10**5)
dp = [infini for _ in range(n)]
dp[0]=0

for pos in range(0, n-1):
   dp[pos+1] = min(dp[pos+1], dp[pos] + abs(stones[pos] - stones[pos+1]))
   if pos <= n-3:
      dp[pos+2] = min(dp[pos+2], dp[pos] + abs(stones[pos] - stones[pos+2]))
print(dp[-1])
a, b, k = map(int, input().split())

l = list(range(a, b+1))

small = l[0:k]
large = l[-k:]

ans = set(small+large)

for i in ans:
    print(i)


### FIXED CODE ###

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

if b-a+1>2*k:
    for i in range(a, a+k):
        print(i)
    for i in range(b-k+1, b+1):
        print(i)
else:
    for i in range(a, b+1):
        print(i)
# -*- coding: utf-8 -*-
N = str(input())
M = str(input())
if N = M.reverse():
  print(YES)
else:
  print(NO)

### FIXED CODE ###

# -*- coding: utf-8 -*-
S = str(input())
T = str(input())
if T[::-1] == S:
  print("YES")
else:
  print("NO")
a,b,k = map(int,input().split())

ans=[]

if a>=b:
    for i in range(1,a//2+1):
        if a%i == 0 and b%i == 0:
            ans.append(i)
else:
    for i in range(1,b//2+1):
        if a%i == 0 and b%i == 0:
            ans.append(i)

print(ans[k-1])

### FIXED CODE ###

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

ans=[]
m=min(a,b)

for i in range(1,m+1):
    if a%i == 0 and b%i == 0:
        ans.append(i)

ans.sort(reverse=True)
print(ans[k-1])
import io
import math
# libraries

n, m = map(int, input().split())

if m<=0<=m+n-1:
  print(sum(range(m,m+n)))

  elif m<0:
  print(sum(range(m,m+n-1)))

  else:
  print(sum(range(m+1,m+n)))

### FIXED CODE ###

nim, lima = map(int, input().split())
if lima<=0<=lima+nim-1:
    print(sum(range(lima,lima+nim)))
elif lima<0:
    print(sum(range(lima,lima+nim-1)))
else:
    print(sum(range(lima+1,lima+nim)))
# coding: utf-8

nums = input().split(" ")
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
num_list = [a, b, c]

max_num = max(num_list)
min_num = min(num_list)

if max_num == a:
	max_index = 0
elif max_num == b:
	max_index = 1
else:
	max_index = 2

if min_num == a and max_index != 0:
	min_index = 0
elif min_num == b and max_index != 1:
	min_index = 1
else:
	min_index = 2

index_list = [0, 1, 2]
del index_list[max_index]
del index_list[min_index]
middle_index = index_list[0]

answer = int( str(num_list[max_index]) + str(num_list[middle_index]) ) + num_list[min_index]

print(answer)


### FIXED CODE ###

# coding: utf-8

nums = input().split(" ")
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
num_list = [a, b, c]

max_num = max(num_list)
min_num = min(num_list)

if max_num == a:
	max_index = 0
elif max_num == b:
	max_index = 1
else:
	max_index = 2

if min_num == a and max_index != 0:
	min_index = 0
elif min_num == b and max_index != 1:
	min_index = 1
else:
	min_index = 2

index_list = [0, 1, 2]
index_list[max_index] = "abc"
index_list[min_index] = "abc"
if index_list[0] == 0:
	middle_index = 0
elif index_list[1] == 1:
	middle_index = 1
else:
	middle_index = 2

answer = int( str(num_list[max_index]) + str(num_list[middle_index]) ) + num_list[min_index]

print(answer)
a,b,c = input().split()
print(a[0].upper() +b[0].upper() + c[0]upper()) 

### FIXED CODE ###


s1, s2, s3 = input().split()
print(s1[0].upper() + s2[0].upper() + s3[0].upper())
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
# 文字列の入力
N = int(input())
#開業されたN個要素を受け付ける
#list = [input() for i in range(N)]
#input_list = [list(map(int, input().split())) for i in range(N)]

ans = ""
if N%10 == 0:
    ans = "pon"
elif N%10 = 1:
    ans = "pon"
elif N%10 = 2:
    ans = "hon"
elif N%10 = 3:
    ans = "bon"
elif N%10 = 4:
    ans = "hon"
elif N%10 = 5:
    ans = "hon"
elif N%10 = 6:
    ans = "pon"
elif N%10 = 7:
    ans = "hon"
elif N%10 = 8:
    ans = "pon"
elif N%10 = 9:
    ans = "hon"

print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
#N, K = map(int, input().split())
# 文字列の入力
N = int(input())
#開業されたN個要素を受け付ける
#list = [input() for i in range(N)]
#input_list = [list(map(int, input().split())) for i in range(N)]

ans = ""
if N%10 == 0:
    ans = "pon"
elif N%10 == 1:
    ans = "pon"
elif N%10 == 2:
    ans = "hon"
elif N%10 == 3:
    ans = "bon"
elif N%10 == 4:
    ans = "hon"
elif N%10 == 5:
    ans = "hon"
elif N%10 == 6:
    ans = "pon"
elif N%10 == 7:
    ans = "hon"
elif N%10 == 8:
    ans = "pon"
elif N%10 == 9:
    ans = "hon"

print(ans)
def Partition(A,p,r):
    x = A[r]
    i = p-1
    for j in range(p,r):
        if (A[j] <= x):
            i += 1
            A[i],A[j] = A[j],A[i]
    A[i+1],A[r] = A[r],A[i+1]
    return i+1

n = int(input())
st = input()
data = list(map(int,st.split()))

mid = Partition(data,0,len(data)-1)

for i in range(0,mid):
    print(data[i],end=" ")
print("[{0}] ".format(data[mid])))
for i in range(mid+1,len(data)-2):
    print(data[i],end=" ")
print(data[len(data)-1])

### FIXED CODE ###

def Partition(A,p,r):
    x = A[r]
    i = p-1
    for j in range(p,r):
        if (A[j] <= x):
            i += 1
            A[i],A[j] = A[j],A[i]
    A[i+1],A[r] = A[r],A[i+1]
    return i+1

n = int(input())
st = input()
data = list(map(int,st.split()))

mid = Partition(data,0,len(data)-1)
for i in range(0,mid):
    print(data[i],end=" ")
print("[{0}] ".format(data[mid]),end="")
for i in range(mid+1,len(data)-1):
    print(data[i],end=" ")
print(data[len(data)-1])
s = " " + input().strip()
t = " " + input().strip()
LS, LT = len(s), len(t)
dp = [[0]*LT for _ in range(LS)]
for i in range(1, LS):
    for j in range(1, LT):
        if s[i] == t[j]:
            dp[i][j] = dp[i-1][j-1] + 1
        else:
            dp[i][j] = max(dp[i-1][j], dp[i][j-1])
a, b = (LS-1, LT-1)
r = ""
while a > 0 and b > 0:
    if s[a] == t[b]:
        r+=s[a]
        a, b = a-1, b-1
    elif dp[a+1][b+1] == dp[a][b+1]:
        a -= 1
    else:
        b -= 1

print(r[::-1])


### FIXED CODE ###

s = input().strip()
t = input().strip()
LS, LT = len(s), len(t)
dp = [[0]*(LT+1) for _ in range(LS+1)]
dp2 = [[(0, 0)]*(LT+1) for _ in range(LS+1)]
for i in range(LS):
    for j in range(LT):
        if s[i] == t[j]:
            dp[i+1][j+1] = dp[i][j] + 1
            dp2[i+1][j+1] = (i, j)
        else:
            dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])
            if dp[i][j+1] > dp[i+1][j]:
                dp2[i+1][j+1] = (i, j+1)
            else:
                dp2[i+1][j+1] = (i+1, j)
bb = []
a, b = (LS, LT)
while a > 0 and b > 0:
    if s[a-1] == t[b-1]:
        bb.append(s[a-1])
    a, b = dp2[a][b]

print("".join(bb[::-1]))
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
from itertools import accumulate #list(accumulate(A))
import math

N, K = mi()
A = li()

if K == 0:
    print(max(A))
    exit()

left = 0
right = max(A)

def count(num):
    cnt = 0
    for i in range(N):
        cnt += math.ceil(A[i] // num)
    
    return cnt


while True:
    mid = (left + right) // 2
    tmp = count(mid)
    if tmp == K:
        break
    elif tmp > K:
        if left == mid:
            mid += 1
            break
        left = mid
    else:
        right = mid


if tmp == K and tmp != count(mid-1):
    print(mid)
    exit()

if mid == 0:
    print(mid)
    exit()

right = mid
while True:
    tmp = count(mid)
    if tmp == K and tmp != count(mid-1):
        print(mid)
        break
    if tmp == K:
        right = mid
    else:
        left = mid
    mid = (left + right) // 2

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
from itertools import accumulate #list(accumulate(A))
import math

N, K = mi()
A = li()

if K == 0:
    print(max(A))
    exit()

left = 0
right = max(A)

def count(num):
    cnt = 0
    for i in range(N):
        cnt += math.ceil(A[i] / num) - 1
    return cnt

while True:
    mid = (left + right) // 2
    if mid == 0:
        print(1)
        exit()
    tmp = count(mid)
    if right - left <= 1:
        mid = right
        break
    elif tmp > K:
        left = mid
    else:
        right = mid

right = mid

while True:
    tmp = count(mid)
    if right - left <= 1:
        print(right)
        break
    elif tmp == K:
        right = mid
    else:
        left = mid
    mid = (left + right) // 2
    if mid == 0:
        print(1)
        break
n,a,b = map(int, input().split())
print( min(n*a,b)

### FIXED CODE ###

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

d = n * a
t = b

ans = min([d,t])
print(ans)
S=input()
K=int(input())

for c in S:
	K-=1
    if K==0:
      print(c)
      break
    if c!='1':
      print(c)
      break

### FIXED CODE ###

S=input()
K=int(input())

for c in S:
  K-=1
  if K==0:
    print(c)
    break
  if c!='1':
    print(c)
    break
A,B,K = map(int, input().split())

if A+B<=K:
  print('0 0')
elif A<=K:
  print('0 {}'.format(B-K+A))
else:
  print('{} {}'.format(A-X,B))

### FIXED CODE ###

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

if A+B<=K:
  print('0 0')
elif A<=K:
  print('0 {}'.format(B-K+A))
else:
  print('{} {}'.format(A-K,B))
N = int(raw_input())
s = sorted([int(raw_input()) for i in range(N)])


_sum = sum(s)


def select_min(l):
    cand = min(l)
    if cand % 10 > 0:
        return cand
    return select_min([i for i in l if i != cand])


if _sum != 0 and _sum % 10 == 0:
    cand = filter(lambda x: x > 0 and x % 10 != 0, s)
    debt = select_min(cand)
    _sum -= debt

print(_sum)


### FIXED CODE ###

N = int(raw_input())
s = sorted([int(raw_input()) for i in range(N)])


_sum = sum(s)


def select_min(l):
    if len(l) == 0:
        return 0
    cand = min(l)
    if cand % 10 > 0:
        return cand
    return select_min([i for i in l if i != cand])


if _sum != 0 and _sum % 10 == 0:
    cand = filter(lambda x: x > 0 and x % 10 != 0, s)
    debt = select_min(cand)
    _sum -= debt

if _sum == 0 or _sum % 10 == 0:
    print(0)
else:
    print(_sum)
n,m=map(int,input().split())
lst=[]
for i in range(m):
  P,Y=map(int,input().split())
  lst.append([P,Y])
lst.sort(key=lambda x:(x[0],x[1]))
lst[0][1]=1
for j in range(m-1):
  if lst[j][0]==lst[j+1][0]:
    lst[j+1][1]=lst[j][1]+1
  else:
    lst[j+1][1]=1

for k in range(m):
  print(plus0(str(lst[k][0]))+plus0(str(lst[k][1])))
  
  





### FIXED CODE ###

n,m=map(int,input().split())
lst=[]
for i in range(m):
  p,y=map(int,input().split())
  lst.append([i,p,y])
lst.sort(key=lambda x:(x[1],x[2]))
j=1
Lst=[]
for i in range(m):
  if lst[i][1]==lst[min(m-1,i+1)][1]:
    s=str(lst[i][1])
    t=str(j)
    u=s.zfill(6)+t.zfill(6)
    j+=1
    Lst.append([lst[i][0],u])
  else:
    s=str(lst[i][1])
    t=str(j)
    u=s.zfill(6)+t.zfill(6)
    j-=j-1
    Lst.append([lst[i][0],u])
Lst.sort(key=lambda x:x[0])
for k in range(m):
  print(Lst[k][1])
count = input()
list = input().split(" ")

i = 0
num = int(list[i])
i += 1
while i>= count:
  num = num * int(list[i])
	
  if num > 10**18:
    print(-1)
    break
    
  i += 1

### FIXED CODE ###

count = int(input())
list = input().split(" ")
state = False
i = 0
num = int(list[i])
i += 1
limit = 10 ** 18
if "0" in list:
  num = 0
  count = 0

while i < count:
  num = num * int(list[i])

  if num > limit:
    print(-1)
    state = True
    break
    
  i += 1

if not state:
  print(num)
n=int(input())
m=int(input())
if (n==1 and m==2) or (n==2 and m==1):
  print('3')
elif (n==1 and m==3) or (n==3 and m==1):
  print('2')
elif (n=3and m==2) or (n==2 and m==3):
  print('1')

### FIXED CODE ###

# cook your dish here
n=int(input())
m=int(input())
if (n==1 and m==2) or (n==2 and m==1):
  print('3')
elif (n==1 and m==3) or (n==3 and m==1):
  print('2')
elif (n==3 and m==2) or (n==2 and m==3):
  print('1')
from collections import deque
from copy import deepcopy

def bfs(pos,map):
      while pos:
        x,y,depth=pos.popleft()
        if map[x][y]=="#":
            continue
        map[x][y]="#"
        if map[x-1][y]!="#":
          pos.append([x-1,y,depth+1])
        if map[x+1][y]!="#":
          pos.append([x+1,y,depth+1])
        if map[x][y+1]!="#":
          pos.append([x,y+1,depth+1])
        if map[x][y-1]!="#":
          pos.append([x,y-1,depth+1])
      return depth
H,W=map(int,input().split())
ans=0
fence=["#"]*(W+2)
field=[fence]
for _ in range(H):
  L=list(input())
  field.append(["#"]+L+["#"])
field.append(fence)
for i in range(1,H+1):
  for j in range(1,W+1):
    if field[i][j]==".": 
      pos=deque([[i,j,0]])
      depth=bfs(pos,deepcopy(field))
      if ans<depth:
        ans=depth
print(ans)

### FIXED CODE ###

alfa=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
c=input()
print(alfa[alfa.index(c)+1])
A, B = map(int, input())
cnt = 0
for i in range(2):
  cnt += max(A, B)
  A -= 1 if A == max(A, B) else B -= 1
  
print(cnt)

### FIXED CODE ###

A, B = map(int, input().split())
cnt = 0
for i in range(2):
    cnt += max(A, B)
    if A == max(A, B):
        A -= 1
    else:
        B -= 1

print(cnt)