qyliang/CodeNanoFix huggingface dataset:
# Buggy code:
import sys

def odd_def(num):
    if num % 2 == 0:
        return False
    else:
        return True

def main():
    a,b = map(int, input().split())
    for i in range(1,4):
        mal = a*b*c
        if odd_def(mal):
            print('Yes')
            sys.exit()
    print('No')


if __name__ == '__main__' :
    main()

# Fixed code:
import sys

def odd_def(num):
    if num % 2 == 0:
        return False
    else:
        return True

def main():
    a,b = map(int, input().split())
    for c in range(1,4):
        mal = a*b*c
        if odd_def(mal):
            print('Yes')
            sys.exit()
    print('No')


if __name__ == '__main__' :
    main()
# Buggy code:
A, B = map(int, input())

if A*B % 2 == 0:
    print("No")
else:
    print("Yes")

# Fixed code:
A, B = map(int,input().split())
if A*B%2 == 0:
    print("No")
else:
    print("Yes")
# Buggy code:
A, B = map(int, input().split())

if ((A*B)%2 == 2):
	print("No")
else:
	print("Yes")

# Fixed code:
A,B =map(int,input().split())
if ((A*B)%2) ==0:
  print("No")
else:
  print("Yes")
# Buggy code:
a,b = map(int,input().split())
if a == 2 or b == 2:
    print('Yes')
else:
    print('No')

# Fixed code:
a, b = map(int, input().split())
if a%2 == 0 or b%2 == 0: print("No")
else: print("Yes")
# Buggy code:
A, B = map(int, input().split())

judge = False
for c in range(1,4):
  if A*B*C %2 == 1:
    judge = True
   

  
if judge == True:
  print("Yes")
else:
  print("False")
      
    

# Fixed code:
A, B = map(int, input().split())
 
judge = False
for C in range(1,4):
  if (A*B*C) %2 == 1:
    judge = True
   
 
  
if judge == True:
  print("Yes")
else:
  print("No")
# Buggy code:
a,b = map(int, input().split())
if a % 2 == 0 and b % 2 == 0:
  print("Yes")
else:
  print("No")

# Fixed code:
a,b=map(int,input().split())
if a%2 and b%2:
  print("Yes")
else:
  print("No")
# Buggy code:
a,b = map.(int,input().split())

if ( a * b ) % 2 == 0:
  print("No")
else:
  print("Yes")

# Fixed code:
a,b=map(int,input().split())
print("Yes" if (a*b)%2 else "No")
# Buggy code:
a,b = map(int, input().split())
c = 0

for i in range(1,3):
    if (a*b*c%2) == 1:
        c = 1

if c == 1:
    print("Yes")
else:
    print("No")

# Fixed code:
a,b = map(int, input().split())
c = 0

for i in range(1,3):
    if ((a*b*i)%2) == 1:
        c = 1

if c == 1:
    print("Yes")
else:
    print("No")
# Buggy code:
a,b = map(int, input().split())

if (a*b)%2 = 1:
  print("Yes")
else:
  print("No")
  


# Fixed code:
a,b = map(int,input().split())
if a % 2 == 1 and b % 2 == 1:
    print('Yes')
else:
    print('No')
# Buggy code:
# -*- coding: utf-8 -*-

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

print('NO' if A * B % 2 == 0 else 'Yes' )




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

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

print('No' if A * B % 2 == 0 else 'Yes' )
# Buggy code:
a,b = map(int,input().split(' '))
if a*b%2:
  print('No')
else:
  print('Yes')
 

# Fixed code:
a,b = map(int,input().split(" "))
if a*b%2 == 0:
    print("No")
else:
    print("Yes")
# Buggy code:
a,b = map(int,input().split())
if a*b % 2 == 0:
    print("Yes")
else:
    print("No")

# Fixed code:
a,b = map(int, input().split())

if a*b % 2 == 0:
  print("No")
else:
  print("Yes")
# Buggy code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    a,b,c = LI()
    print(9*max(a,b,c)+a+b+c)
    return

#B
def B():
    a,b = LI()
    if a*b %2:
        print("Yes")
    else:
        print("No")
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#I
def I_():
    return

#J
def J():
    return

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


# Fixed code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    a,b,c = LI()
    print(9*max(a,b,c)+a+b+c)
    return

#B
def B():
    a,b = LI()
    if a*b %2:
        print("Yes")
    else:
        print("No")
    return

#C
def C():
    k = I()
    print(k//2-1)*(k//2)
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#I
def I_():
    return

#J
def J():
    return

#Solve
if __name__ == "__main__":
    B()
# Buggy code:
A,B=map(int,input().split())

if(A%2==0 and B%2==0):
  print("No")
else:
  print("Yes")

# Fixed code:
A,B=map(int,input().split())

if(A%2!=0 and B%2!=0):
  print("Yes")
else:
  print("No")
# Buggy code:
a , b = map(int, input().split())
if (a * b %% 2 == 1) :
  print("Yes")
else:
  print("No")

# Fixed code:
a, b = map(int, input().split())

if (a*b) % 2 ==1:
    print("Yes")
else:
    print("No")
# Buggy code:
a,b=map(int,input().split())
if a*b%2=1:
  print(Yes)
else:
  print(No)

# Fixed code:
a,b = map(int,input().split())
if a*b%2==1:
    print('Yes')
else:
    print('No')
# Buggy code:
a, b = map(int, input().split())

if a%2 == 1 .and. b%2 == 1:
    print('Yes')
else:
    print('No')

# Fixed code:
a, b = map(int, input().split())

if a%2 == 1 and b%2 == 1:
    print('Yes')
else:
    print('No')
# Buggy code:
a, b = map(int, input().split())
if a % 1 == 0 or b % 2 == 0:
    print("No")
else:
    print("Yes")

# Fixed code:
a,b = list(map(int,input().split()))

if a%2 == 0 or b%2 == 0:
  print("No")
else:
  print("Yes")
# Buggy code:
args = input().split(" ")
if args[0]*args[1]%2 == 0:
  print("No")
else:
  print("Yes")

# Fixed code:
args = input().split()
if ( int(args[0]) * int(args[1]) ) % 2 == 0:
  print("No")
else:
  print("Yes")
# Buggy code:
a, b = map(int, input().split())
for n in range(1, 4):
  if a*b*c % 2 == 1:
    print('Yes')
    break
  else:
    if n == 3:
      print('No')

# Fixed code:
a, b = map(int, input().split())
for c in range(1, 4):
  if a*b*c % 2 == 1:
    print('Yes')
    break
  else:
    if c == 3:
      print('No')
# Buggy code:
a , b = map(int , input().split())
if a * b % 2 == 0 :
    print("Yes")
else :
    print("No")


# Fixed code:
a,b= map(int,input().split(' '))
if (a*b)%2 != 0:
    print('Yes')
else:
    print('No')
# Buggy code:
a,b = map(int, input().split())
if a*b % :
    print("Yes")
else:
    print("No")

# Fixed code:
a,b=map(int, input().split())
if a*b%2==1:
  print('Yes')
else:
  print('No')
# Buggy code:
a, b = map(int, input.split())
if (a * b) % 2 == 0:
  print("No")
else:
  print("Yes")

# Fixed code:
a, b = map(int, input().split())

if a*b%2 == 1:
  print('Yes')
else:
  print('No')
# Buggy code:
a, b = map(int, input().split())
for c in range(1, 4):
  if a*b*c%2 == 1:
    print('Yes')
	break
else:
  print('No')

# Fixed code:
a, b = map(int, input().split())
for c in range(1, 4):
    if a*b*c%2 == 1:
        print('Yes')
        break
else:
    print('No')
# Buggy code:
A, B = map(int, input().split())

if (A * B) % 2 == 0:
    print("No")
else:
    print("YES") 

# Fixed code:
A,B = map(int, input().split())
if (A*B)%2 == 0:
    print("No")
else:
    print("Yes")
# Buggy code:
a,b=map(int,input().split())
if a%2== and b%2==0:
    print("Yes")
else:
    print("No")

# Fixed code:
a,b=map(int,input().split())
if a%2==1 and b%2==1 :
    print('Yes')
else :
    print('No')
# Buggy code:
a,b=map(int,input().split())
if (a*b)%2==1:
    print("Yws")
else:
    print("No")


# Fixed code:
a,b=map(int,input().split())
if (a*b)%2==1:
    print("Yes")
else:
    print("No")
# Buggy code:
#coding: utf-8
N = input()
K = int(input())
if N[0] == 1:
    for i in range(1, len(N)):
        if N[i] != 1:
            print(N[i])
            break
else:
    print(N[0])

# Fixed code:
#coding: utf-8
N = input()
K = int(input())
ans = 0
for i in range(min(K, len(N))):
    if int(N[i]) != 1:
        ans = N[i]
        #print(N[i])
        break
print(ans if ans != 0 else 1)
# Buggy code:
s = str(input())
k = int(input())


ind = 0
num = 1


for i in range(len(s)):
    ind = i+1
    if s[i] != 1:
        num = int(s[i])
        break
        
if k>= ind:
    ans = num
else:
    ans = 1
    
print(ans)

# Fixed code:
s = str(input())
k = int(input())



num = 1


for i in range(len(s)):
    ind = i+1
    if s[i] != '1':
        num = int(s[i])
        break
        
if k>= ind:
    ans = num
else:
    ans = 1
    
print(ans)
# Buggy code:
S = input()
K = int(input())
ans = "1"
for i in range(K):
  if S[i] != "1":
    ans = i
    break
print(ans)

# Fixed code:
S = input()
K = int(input())

for i in range(K) :
    if S[i] != '1' :
        print(S[i])
        break
else :
    print('1')
# Buggy code:
S = list(input())
K = int(input())

for i in range(K):
    if S[i] != '1':
        ans = s
        break
    else:
        ans = 1
        continue
print(ans)

# Fixed code:
S = list(input())
K = int(input())

for i in range(K):
    if S[i] != '1':
        ans = S[i]
        break
    else:
        ans = 1
        continue
print(ans)
# Buggy code:
s = str(input())
k = int(input())
for i in range(k):
    if s[k] != 1:
        print(s[k])
        exit()
print(1)

# Fixed code:
s = str(input())
k = int(input())
for i in range(k):
    if s[i] != "1":
        print(s[i])
        exit()
print(1)
# Buggy code:
S = input()
K = int(input())

for i in range(len(S)):
    if S[i] != '1':
        print(S[i])
        break
    else:
        if i == N - 1:
            print(1)
            break
        else:
            continue

# Fixed code:
S = input()
K = int(input())

for i in range(len(S)):
    if S[i] != '1':
        print(int(S[i]))
        break
    else:
        if i == K - 1:
            print(1)
            break
        else:
            continue
# Buggy code:
s = input()
k = int(input())
ans = 1
if k =< len(s):
    if s[:k] == "1" * k:
        ans = 1
    else:
        ans = int(s[k-1])
else:
    for i in range(len(s)):
        if s[i] != "1":
            ans = int(s[i])
            break
print(ans)

# Fixed code:
s = input()
k = int(input())
ans = 1
if k <= len(s):
    if s[:k] == "1" * k:
        ans = 1
    else:
        for i in range(len(s)):
            if s[i] != "1":
                ans = int(s[i])
                break
else:
    for i in range(len(s)):
        if s[i] != "1":
            ans = int(s[i])
            break
print(ans)
# Buggy code:
#C
S=input()
K=int(input())
num='23456789'
if S[0]!='1':
    print(1)
else:
    n=1
    while True:
        if n==len(S):
            n-=1
            break
        elif S[n]!='1':
            break
        n+=1
if K-1<n:
    print(1)
else:
    print(S[n])

# Fixed code:
#C
S=input()
K=int(input())
num='23456789'
if S[0]!='1':
    print(int(S[0]))
else:
    n=1
    while True:
        if n==len(S):
            n-=1
            break
        elif S[n]!='1':
            break
        n+=1
    if K-1<n:
        print(1)
    else:
        print(int(S[n]))
# Buggy code:
def main():
    s = input().rstrip()
    k = int(input().rstrip())

    if s[0] != '1':
        print(s[0])
        return

    cnt = 0
    for a in s:
        if a == '1':
            cnt += 1

    if k < cnt:
        print(1)
    else:
        print(s[cnt])
    
    
main()


# Fixed code:
def main():
    s = input().rstrip()
    k = int(input().rstrip())

    if s[0] != '1':
        print(s[0])
        return

    cnt = 0
    for a in s:
        if a == '1':
            cnt += 1
        else:
            break

    if k <= cnt:
        print(1)
    else:
        print(s[cnt])
    
    
main()
# Buggy code:
import sys
s = input()
k = int(input())
k = min(k,len(s))
i = 0
while i < k:
  if s[i] != 1:
    print(s[i])
    sys.exit()
  i += 1
print(1)

# Fixed code:
import sys
s = input()
k = int(input())
k = min(k,len(s))
i = 0
flag = 0
while i < k:
  if int(s[i]) != 1:
    print(s[i])
    flag = 1
    sys.exit()
  i += 1
if flag == 0:
  print(1)
# Buggy code:
s = input()
k = int(input())
ans = "1"
for i in s[:k]:
    if i!= "1":
        ans = i
        exit()
print(ans)

# Fixed code:
s = input()
k = int(input())
ans = "1"
for i in s[:k]:
    if i != "1":
        ans = i
        break
print(ans)
# Buggy code:
s=list(input())
k=int(input())
if len(s)==1 or k==1:
    print(int(s[0]))
else:
    for i in range(len(s)):
        if int(s[i])==1 or i!=len(s)-1 or i<k:
            continue
        else:
            print(int(s[i]))
            break

# Fixed code:
s=list(input())
k=int(input())
if len(s)==1 or k==1:
    print(int(s[0]))
else:
    for i in range(len(s)):
        if int(s[i])==1 and i!=len(s)-1 and (i+1)<k:
            continue
        else:
            print(int(s[i]))
            break
# Buggy 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

s = input()
k = ni()
keta = 0
for i in range(len(s)):
    if s[i] == "1":
        continue
    else:
        keta = i + 1
        break
if k < keta:
    print("1")
else:
    print(s[keta])


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

s = input()
k = ni()
keta = 0
for i in range(len(s)):
    if s[i] == "1":
        continue
    else:
        keta = i
        break
if k < keta + 1:
    print("1")
else:
    print(s[keta])
# Buggy code:
S = input()
K = int(input())

if K == 1:
	print(S[0])
else:
	i = 0
	K -= 1
	while S[i] == "1" and K > 0:
		i += 1
		K -= 1
	print((i,S[i]))


# Fixed code:
S = input()
K = int(input())
if K == 1:
	print(S[0])
	exit()
else:
	i = 0
	K -= 1
	while S[i] == "1" and K > 0:
		i += 1
		K -= 1
	print(S[i])
# Buggy code:
s = list(input())
k = int(input())

if s[0] == "1" and k != 1:
    if len(s) < k:
        for i in s:
            if int(i) != 1:
                print(int(s[int(i)]))

    else:
        for l in s[0:k:]:
            if int(k) != 1:
                print(int(s[int(l)]))
                break

            if l == k - 1:
                print(1)

elif s[0] == "1" and k == 1:
    print(1)


# Fixed code:
s = list(input())
k = int(input())

if s[0] != "1":
    print(int(s[0]))

elif s[0] == "1" and k != 1:
    if len(s) < k:
        for i in s:
            if int(i) != 1:
                print(int(i))
                break

    else:
        for l in range(0, k):
            if int(s[l]) != 1:
                print(int(s[l]))
                break

            if l == k - 1:
                print(1)

elif s[0] == "1" and k == 1:
    print(1)
# Buggy code:
S = input()
K = int(input())
one_count = 0

for i in range(len(S)):
    if S[i] != '1':
        print(S[i])
        break
    else:
        one_count += 1

if one_count >= K:
    print('1')
else:
    print('0')

# Fixed code:
S = input()
K = int(input())
one_count = 0
ans = 0

for i in range(len(S)):
    if S[i] != '1':
        ans = S[i]
        break
    else:
        one_count += 1

if one_count >= K:
    print('1')
else:
    print(ans)
# Buggy code:
n=list(input())
k=int(input())
if len(n)==1:
  print('1')
else:
  one_list=[]
  while len(n)!=0:
    if n[0]=='1':
      one_list.pop(n.pop(0))
    else:
      break
  if 0<len(one_list)<=k:
    print('1')
  else:
    print(n[0])

# Fixed code:
n=list(input())
k=int(input())
if len(n)==1 and n[0]=='1':
  print('1')
else:
  one_list=[]
  while len(n)!=0:
    if n[0]=='1':
      one_list.append(n.pop(0))
    else:
      break
  if k<=len(one_list):
    print('1')
  else:
    print(n[0])
# Buggy code:
s = input()
k = int(input())
ans  = False
for i in range(k):
    if s[i] != '1':
        print(s[i])
        ans = True
        break
if ans:
    print(1)

# Fixed code:
s = input()
k = int(input())
ans  = True
for i in range(k):
    if s[i] != '1':
        print(s[i])
        ans = False
        break
if ans:
    print(1)
# Buggy code:
n = input()
k = int(input())

if(k == 1):
    print(n[0])
elif(len(n)==1):
    print(n)
elif(n[0]== '1'):
    i = 1
    while(n[i] == '1' or i + 1 < len(n)):
        i += 1
    if(k <= i):
        print(1)
    else:
        print(n[i])
else:
    print(n[0])

# Fixed code:
n = input()
k = int(input())

if(k == 1):
    print(n[0])
elif(len(n)==1):
    print(n)
elif(n[0]== '1'):
    i = 1
    while(n[i] == '1'):
        i += 1
        if(i == len(n)):
            break
    if(k <= i):
        print(1)
    else:
        print(n[i])
else:
    print(n[0])
# Buggy code:
s = input()
k = int(input())
for i in range(len(s)):
  if s[i] != 1:
    if k < i:
      print(1)
     else:
      print(s[i])
	break
else:
  print(1)

# Fixed code:
s = input()
k = int(input())
for i in range(len(s)):
    if s[i] != "1":
        if k < i+1:
            print(1)
        else:
            print(s[i])
        break
else:
    print(1)
# Buggy code:
import sys
# N,M = [int(n) for n in input().split()]
# S = str(input())
# T = str(input())

S = str(input())
K = int(input())
numplace = 0

for i in range(len(S)):
    if (S[i] == "1"):
        numplace+=1
    else:
        numplace+= int(S[i])**5000000000000000
    if(numplace>=K):
        print(S[i])
        sys.exit()


# Fixed code:
import sys
# N,M = [int(n) for n in input().split()]
# S = str(input())
# T = str(input())

S = str(input())
K = int(input())
numplace = 0

for i in range(len(S)):
    if (S[i] == "1"):
        numplace+=1
    else:
        numplace+= 5000000000000000**int(S[i])
    if(numplace>=K):
        print(S[i])
        sys.exit()
# Buggy code:
def abc106_c():
    s = input()
    k = int(input())

    if s[:k] == "1"*k:
        return 1
    else:
        return (s.replace("1", ""))[0]


print(abc106_c())

# Fixed code:
def abc106_c():
    s = input()
    k = int(input())

    if s[:k].replace("1", "") == "":
        return 1
    else:
        return (s.replace("1", ""))[0]


print(abc106_c())
# Buggy code:
S=list(map(int,list(input())))
K=int(input())

if S[0]==1:
  if K==1:
    print(1)
  else:
    for i in range(1,len(S)):
      if S[i] != 1:
        print(S[i])
        exit(0)
      if i == K-1:
        print(1)
        exit(0)

# Fixed code:
S=list(map(int,list(input())))
K=int(input())

if S[0]==1:
  if K==1:
    print(1)
  else:
    for i in range(1,len(S)):
      if S[i] != 1:
        print(S[i])
        exit(0)
      if i == K-1:
        print(1)
        exit(0)
else:
  print(S[0])
# Buggy code:
s = input()
k = (int)(input())

c = 0
for c in s:
  if not c == '1':
    break
  c += 1
n = s[c] if c < len(S) else None
a = n if n and c < K else S[0]
print(a)


# Fixed code:
s = input()
k = (int)(input())

c = 0
for ch in s:
  if not ch == '1':
    break
  c += 1
n = s[c] if c < len(s) else None
a = n if n and c < k else s[0]
print(a)
# Buggy code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    S = input()
    K = int(input())

    T = ''
    for i in range(len(S)):
        if S[i] == '1':
            T += '1'
        else:
            T += S[i] * K

        if S[i] != '1':
            break

    print(T[K - 1])


if __name__ == '__main__':
    main()


# Fixed code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    S = input()
    K = int(input())

    if K >= 1e3:
        K = 105

    T = ''
    for i in range(len(S)):
        if S[i] == '1':
            T += '1'
        else:
            T += S[i] * K

        if S[i] != '1':
            break

    print(T[K - 1])


if __name__ == '__main__':
    main()
# Buggy code:
s = input()
n = int(input())

count = 0
for i in s:
  	count += 1
    if i != "1" or count == n:
        print(i)
        break
else:
    print(1)

# Fixed code:
s = input()
n = int(input())
 
count = 0
for i in s:
    count+=1
    if i != "1" or count == n:
        print(i)
        break
else:
    print(1)
# Buggy code:
s = input()
k = int(input())
ans = 0
count = 0
for i in range(len(s)):
    if k == "1":
        count += 1
        if count == k:
            ans = 1
            break
    else:
        ans = s[i]
        break
print(ans)

# Fixed code:
s = input()
k = int(input())
count = 0
ans = 0
for i in range(len(s)):
    if s[i] == "1":
        count += 1
        if count == k:
            ans = 1
            break
    else:
        ans = s[i]
        break
print(ans)
# Buggy code:
S = input()
K = int(input())
# print(S, K)
for i in range(len(S)):
    if i >= K:
        break
    if s != '1':
        print(s)
        exit()
print('1')


# Fixed code:
S = input()
K = int(input())
# print(S, K)
for i in range(len(S)):
    s = S[i]
    if i >= K:
        break
    if s != '1':
        print(s)
        exit()
print('1')
# Buggy code:
S = input()
K = int(input())
if S[0]*len(S) == S:
    print("1")
else:
    ans = 0
    ind = 0
    for i in range(len(S)):
        if S[i] != "1":
            ans = S[i]
            ind = i+1
    if ind > K:
        print("1")
    else:
        print(ans)

# Fixed code:
S = input()
K = int(input())
if S[0]*len(S) == S and S[0] == "1":
    print("1")
else:
    ans = 0
    ind = 0
    for i in range(len(S)):
        if S[i] != "1":
            ans = S[i]
            ind = i+1
            break
    if ind > K:
        print("1")
    else:
        print(ans)
# Buggy code:
s=input()
k=int(input())
fl=0
t=0
for i in range(len(s)):
  if s[i]=='1' and fl=0:
    t+=1
  else:
    if fl==0:
      ans=s[i]
      fl=1
if t<=k:
  ans='1'
print(ans)

# Fixed code:
s=input()
k=int(input())
fl=0
t=0
ans='1'
for i in range(len(s)):
  if s[i]=='1' and fl==0:
    t+=1
  else:
    if fl==0:
      ans=s[i]
      fl=1
if t>=k:
  ans='1'
print(ans)
# Buggy code:
a = map(int,input().split())
Min = min(a)
Max = max(a)
Mid = sum(a) - Max - Min

ans = Mid-Min + Max-Mid
print(ans)

# Fixed code:
a = list(map(int,input().split()))
Min = min(a)
Max = max(a)
Mid = sum(a) - Max - Min
 
ans = Mid-Min + Max-Mid
print(ans)
# Buggy code:
L=map(int,input().split())
L.sort()
s=0
for i in range(1,3):
  s+=L[i]-L[i-1]
print(s)

# Fixed code:
L = list(map(int,input().split()))
L.sort()
s=0
for i in range(1,3):
  s+=L[i]-L[i-1]
print(s)
# Buggy code:
A1, A2, A3 = map(int, input().split())
print(min(abs(A1 - A2) + abs(A2 - A3), abs(A1 - A3) + abs(A2 - A3), abs(A2 - A1) + abs(A1 - A3), abs(A2 - A3) + abs(A3 - A1), abs(A3 - A1) + abs(A1 - A2), abs(A3 - A2) + abs(A2 - A1))

# Fixed code:
A1, A2, A3 = map(int, input().split())
print(min(abs(A1 - A2) + abs(A2 - A3), abs(A1 - A3) + abs(A2 - A3), abs(A2 - A1) + abs(A1 - A3), abs(A2 - A3) + abs(A3 - A1), abs(A3 - A1) + abs(A1 - A2), abs(A3 - A2) + abs(A2 - A1))
     )
# Buggy code:
A = list(map(int,input().split()))
ans = []
a = abs(A(0)-A(1))+abs(A(1)-A(2))##0→1→2
b = abs(A(0)-A(2))+abs(A(2)-A(1))##0→2→1
c = abs(A(1)-A(0))+abs(A(0)-A(2))##1→0→2
ans.append(a)
ans.append(b)
ans.append(c)
print(min(ans))


# Fixed code:
A = list(map(int,input().split()))
ans = []
a = abs(A[0]-A[1])+abs(A[1]-A[2])##0→1→2
b = abs(A[0]-A[2])+abs(A[2]-A[1])##0→2→1
c = abs(A[1]-A[0])+abs(A[0]-A[2])##1→0→2
ans.append(a)
ans.append(b)
ans.append(c)
print(min(ans))