Buggy python submission (verdict: Runtime Error):
S = input()
K = input()
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break
if int(K) > i:
  print(S[k])
else:
  print(1)

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = input()
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break
if K > i:
  print(S[k])
else:
  print(1)

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = input()
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break
if K > i:
  print(S[k])
else:
  print(1)

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break
if i >= K:
  print(l[K])
else:
  print(l[i])

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == 100:
  print(1)
if K < 99:
  print(l[K-1])
else:
  print(l[i-1])


Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == 100:
  print(1)
if K < 99:
  print(l[K-1])
else:
  print(l[i-1])


Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == 100:
  print(1)
if K < 99:
  print(l[K-1])
else:
  print(l[i-1])

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))
l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break

if i == s:
  print(1)
else:
  print(l[K-1])

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))

l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break
if i == s:
  print(1)
if i >= K:
  print(l[K])
else:
  print(l[i])

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
s = len(str(S))

l = [str(x) for x in S]
i = 0
while i <= s - 1:
  if l[i] == '1':
    i = i + 1
  else:
    break
if i == s:
  print(1)
else:
  print(l[K])

Fixed submission:
S = input()
K = int(input())
s = len(str(S))
i=0

while i < s-1:
  if S[i] == '1':
    i = i + 1
  else:
    break

if K > i:
  print(S[i])
else:
  print(1)