Harryxun/stf_run huggingface dataset:
n,a,b,c,d=map(int,input().split())
s=list(input())
if c<d:
  f=0
  for i in range(b,d-1):
    if s[i]=='#' and s[i+1]=='#':
      f==1
      break
  if f==0:
    for i in range(a,c-1):
      if s[i]=='#' and s[i+1]=='#':
        f=1
  if f==1:print('No')
  else:print('Yes')
else:
  f=0
  for i in range(b,d-1):
    if s[i]=='#' and s[i+1]=='#':
      f=1
      break
  if f==1:
    print('No')
  else:
    for i in range(a,c-1):
      if s[i]=='#' and s[i+1]=='#':
        f=1
        break
    if f==1:
      print('No')
    else:
      if s[d-2]=='#' or s[d]=='#':
        ct=0
        for i in range(b,d-2):
          if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':
            ct=1
            break
        if ct==0:
          if s[b-2]=='#' or s[b]=='#':
          print('No')
        else:
          print('Yes')
      else:
        print('Yes')

### FIXED CODE ###

n,a,b,c,d=map(int,input().split())
s=list(input())
if c<d:
  f=0
  for i in range(b,d-1):
    if s[i]=='#' and s[i+1]=='#':
      f=1
      break
  if f==0:
    for i in range(a,c-1):
      if s[i]=='#' and s[i+1]=='#':
        f=1
        break
  if f==1:print('No')
  else:print('Yes')
else:
  f=0
  for i in range(b,d-1):
    if s[i]=='#' and s[i+1]=='#':
      f=1
      break
  if f==0:
    for i in range(a,c-1):
      if s[i]=='#' and s[i+1]=='#':
        f=1
        break
  if f==0:
    if (s[d-2]=='#' or s[d]=='#') and (s[b-2]=='#' or s[b]=='#'):
      ct=0
      for i in range(b-1,d-2):
        if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':
          ct+=1
          break
      if ct==0:
        f=1
  if f==1:print('No')
  else:print('Yes')
ef main():
    N = int(input())
    A = list(map(int, input().split()))
    A.insert(0, 1e10)
    ans = []
    B = [0] * len(A)
    for i in range(len(A)-1, 0, -1):
        idx = i
        s = 0
        while idx <= len(A) - 1:
            s += B[idx]
            idx += i

        if s % 2 != A[i]:
            ans.append(i)
            B[i] = 1

    
    if len(ans) > 0:
        print(len(ans))
        print(*ans)
    else:
        print(0)


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    N = int(input())
    A = list(map(int, input().split()))
    A.insert(0, 1e10)
    ans = []
    B = [0] * len(A)
    for i in range(len(A)-1, 0, -1):
        idx = i
        s = 0
        while idx <= len(A) - 1:
            s += B[idx]
            idx += i

        if s % 2 != A[i]:
            ans.append(i)
            B[i] = 1

    
    if len(ans) > 0:
        print(len(ans))
        print(*ans)
    else:
        print(0)


if __name__ == '__main__':
    main()
def YesNo(b):
    print("Yes" if b else "No")


def solve(n, v, l, ini):
    ml = n*2+1
    dp = [[False]*ml for i in range(len(l)+1)]
    for i in range(len(ini)):
        dp[0][ini[i]+n] = True
    for i in range(1, len(l)+1):
        for j in range(ml):
            if (j+l[i-1]) < ml and dp[i-1][j]:
                dp[i][j+l[i-1]] = True
            if (j-l[i-1]) >= 0 and dp[i-1][j]:
                dp[i][j-l[i-1]] = True
    return dp[len(l)][v+n]


s = input()
x, y = map(int, input().split())
si = 0
while si < len(s) and s[si] == 'F':
    si += 1

s = s[si:]
if len(s) == 0:
    YesNo(x == si and y == 0)
else:
    f = s.split('T')[1:]
    xl, yl = [], []
    for i in range(len(f)):
        if i % 2 == 0:
            yl.append(len(f[i]))
        else:
            xl.append(len(f[i]))

    if len(yl) == 0:
        yl.append(0)
    YesNo(solve(sum(xl), x, xl, [si]) and solve(sum(yl), y, yl[1:], [-yl[0], yl[0]]))


### FIXED CODE ###


def YesNo(b):
    print("Yes" if b else "No")


def solve(v, l, ini):
    ml = 8000*2+1
    dp = [[False]*ml for i in range(len(l)+1)]
    for i in range(len(ini)):
        dp[0][ini[i]+8000] = True
    for i in range(1, len(l)+1):
        for j in range(ml):
            if (j+l[i-1]) < ml and dp[i-1][j]:
                dp[i][j+l[i-1]] = True
            if (j-l[i-1]) >= 0 and dp[i-1][j]:
                dp[i][j-l[i-1]] = True
    return dp[len(l)][v+8000]


s = input()
x, y = map(int, input().split())
si = 0
while si < len(s) and s[si] == 'F':
    si += 1

s = s[si:]
if len(s) == 0:
    YesNo(x == si and y == 0)
else:
    f = s.split('T')[1:]
    xl, yl = [0], [0]
    for i in range(len(f)):
        if len(f[i]) == 0:
            continue
        if i % 2 == 0:
            yl.append(len(f[i]))
        else:
            xl.append(len(f[i]))

    YesNo(solve(x, xl, [si]) and solve(y, yl[1:], [-yl[0], yl[0]]))
import math
a, b = map(int, input(), split( ))
print(math.ceil((a + b) / 2))


### FIXED CODE ###

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

print(math.ceil((a + b) / 2))
import math

N,M=map(int,input().split())
a=[-1]+[int(input()) for i in range(M)]+[N+1]
ans=1

for i in range(M+1):
    dist=a[i+1]-a[i]-2
    if dist<0 and a[i]!=-1 and a[i+1]!=N+1:
        ans=0
        break
    
    val=0
    cnt1=dist%2
    cnt2=dist//2
    while cnt2 >= 0:
        val+=math.factorial(cnt1+cnt2)/math.factorial(cnt1)/math.factorial(cnt2)
        cnt2-=1
        cnt1+=2
    ans*=val

    while ans>1000000007:
        ans-=1000000007

print(int(ans))

### FIXED CODE ###

N,M=map(int,input().split())
dp=[0]*(N+3)
dp[0]=1
a=[0]*(N+3)
for i in range(M):
    a[int(input())]=1
mod=10**9+7

for i in range(N+1):
    if a[i+1] != 1:
        dp[i+1]+=dp[i]
        dp[i+1]%=mod
    if a[i+2] != 1:
        dp[i+2]+=dp[i]
        dp[i+2]%=mod

print(dp[N])
(X,K,D) = map(int,input().split())
X = abs(X)
if X-K*D>0:
    print(X-K*D)

else:
    if K%2==0:
        print(min(abs(X%(2*D)),abs(X%(2*D)-2*D)))
    else:
        print(min(abs((X+D)%(2*D),abs((X+D)%(2*D)-2*D))))


### FIXED CODE ###

(X,K,D) = map(int,input().split())
X = abs(X)
if X-K*D>0:
    print(X-K*D)

else:
    if K%2==0:
        print(min(abs(X%(2*D)),abs(X%(2*D)-2*D)))
    else:
        print(min(abs((X+D)%(2*D)),abs((X+D)%(2*D)-2*D)))
import math
n, k, *h = map(int, open(0).read().split())
dp = [math.inf] * n
dp[0] = 0
for i in range(1, n):
    for j in range(max(0, i-k), i):
        dp[i] = min(dp[j] + abs(h[i] - h[j]), dp[i])
print(dp[n-1])

### FIXED CODE ###

def main():
    n, k, *h = map(int, open(0).read().split())
    dp = [float('inf')] * n
    dp[0] = 0
    for i in range(1, n):
        min_i = max(0, i-k)
        dp[i] = min([dp[j] + abs(h[i] - h[j]) for j in range(min_i, i)])
    print(dp[n-1])
if __name__ == '__main__':
    main()
S = map(int, raw_input().split())
h = S/3600
m = S%3600/60
s = S%3600%60
print h":"m":"s

### FIXED CODE ###

S = int(raw_input())
h = S/3600
m = S%3600/60
s = S%3600%60
h,m,s = map(str,(h,m,s))
print h+':'+m+':'+s
N, K = list(map(int, input().split()))
links = [list(map(int, input().split())) for _ in range(N-1)]

def perm(a, b):
    s = 1
    for i in range(a-b+1, a+1):
        s *= i
    return s

if N == 1:
    ans = K
else:
    perm_dict = {}
    mod = 1000000007
    d = {i: set() for i in range(1, N+1)}
    history = [True] * (N + 1)
    for i, j in links:
        d[i].add(j)
        d[j].add(i)
    for v in d[1]:
        d[v].remove(1)
    b = len(d[1])
    if K - 1 < b:
        ans = 0
    else:
        ans = K * perm(K - 1, b)
        history[1] = False
        a = K - 2
        stack = d[1]
        while stack:
            node = stack.pop()
            for v in d[node]:
                d[v].remove(node)
            b = len(d[node])
            if a < b:
                ans = 0
                break
            if b not in perm_dict:
                perm_dict[b] = perm(a, b)
            ans *= perm_dict[b]
            stack |= d[node]
            
print(ans % mod)

### FIXED CODE ###

N, K = list(map(int, input().split()))
l = [[] for _ in range(N + 1)]
for _ in range(N - 1):
    a, b = list(map(int, input().split()))
    l[a].append(b)
    l[b].append(a)

deg1 = [0] * (N + 1)
deg2 = [0] * (N + 1)
history = [True] * (N + 1)
stack = [1]
ans = 1

while stack:
    node = stack.pop()
    ans *= K - deg1[node] - deg2[node]
    ans %= 1000000007
    history[node] = False
    for child in l[node]:
        if history[child]:
            deg1[child] += 1
            deg2[child] += deg1[node]
            deg1[node] += 1
            stack.append(child)
            
print(ans)
import math
N,K = map(int,input().split())
a = list(map(int,input().split()))
print(math.ceil((N-1)/(K-1)))

### FIXED CODE ###

S = input()
x = 0
for c in S:
    if c == "+":
        x += 1
    else:
        x -= 1
print(x)
n = int(input())
sides = []
data = [[] for _ in range(n)]
for _ in range(n-1):
    a,b = map(int,input().split())
    a,b = a-1,b-1
    data[a].append(b)
    data[b].append(a)
    sides.append((a,b))
kinds = -1
for i in range(n):
    kinds = max(kinds,len(data[i]))
print(kinds)
strage = [[i for i in range(1,kinds+1)] for i in range(n)]
for i,j in sides:
    p = strage[i].pop()
    q = strage[j].pop()
    if p == q:
        print(p)
    elif p > q:
        print(q)
        strage[i].remove(q)
        strage.append(p)
    else:
        print(p)
        strage[j].remove(p)
        strage.append(q)

### FIXED CODE ###

from collections import deque,defaultdict
n = int(input())
data = [[] for _ in range(n)]
sides = []
for _ in range(n-1):
    a,b = map(int,input().split())
    a,b = a-1,b-1
    data[a].append(b)
    data[b].append(a)
    sides.append((a,b))
I = defaultdict(lambda:0)
cs = [0]*n
used = [0]*n
q = deque([0])
used[0]=1
k = 0
while q:
    u = q.popleft()
    if k < len(data[u]):
        k = len(data[u])
    cur = 1
    for v in data[u]:
        if used[v]:continue
        if cur==cs[u]:cur+=1
        cs[v] = cur
        I[(u,v)] = cur
        I[(v,u)] = cur
        cur += 1
        used[v] = 1
        q.append(v)
print(k)
for i,j in sides:
    print(I[(i,j)])
n = int(input())
re = 1

for i in range(n):
  m = int(input())
  
  re *= m
if(re >= 1000000000000000000):
    print("-1")
else:
    print(re)

### FIXED CODE ###

n =int(input())
limit = 10**18
re =1
 
l = list(map(int, input().split()))
 
l.sort()
#print(l)
if(l[0] == 0):
    re = 0
else:
  for i in l:
    re *= i
    #print(re)
    if(re > limit):
      re = -1
      break
print(re)
def combination(n, k):
	return fact(n) / ( fact(n-k) * fact(k) )

def fact(n):
	if n < 0:
		return 0
	if n == 0:
		return 1
	if n == 1:
		return 1
	return fact(n-1)

n, m = [int(x) for x in input().split()]
answer = combination(n, 2) + combination(m, 2)
print(answer)

### FIXED CODE ###

def fact(n):
    if n < 0:
        return 0
    if n == 0:
        return 1
    if n == 1:
        return 1
    return n * fact(n-1)

def combination(n, k):
    if n < k:
        return 0
    return fact(n) / ( fact(n-k) * fact(k))

n, m = [int(x) for x in input().split()]
answer = int(combination(n, 2) + combination(m, 2))
print(answer)
import math 
X,Y = map(int, input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(X,Y))

### FIXED CODE ###

import fractions
X,Y = map(int, input().split())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
print(lcm(X,Y))
S = int(input())
from math import factorial
ans = 0


m = S // 3 #最大桁数

print(m)

for p in range(1,m+1):
    x = S - 3*(p) #p桁 自由度x
    a = factorial(x+p-1) 
    b = factorial(p-1) 
    c = factorial(x)
    ans += ( a / b / c )%(10**9+7)


print(int((ans)%(10**9+7)))




### FIXED CODE ###

S = int(input())
from math import factorial
ans = 0


m = S // 3 #最大桁数

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under



for p in range(1,m+1):
    x = S - 3*(p) #p桁 自由度x
    """
    a = factorial(x+p-1) 
    b = factorial(p-1) 
    c = factorial(x)
    ans += ( a / b / c )%(10**9+7)
    """
    ans += cmb(x+p-1,p-1)


print(int((ans)%(10**9+7)))
# D
N = int(input())
edge = [[] for _ in range(N)]
for _ in range(N):
    ai,bi,ci = map(int, input().split())
    edge[ai-1].append((bi-1, ci))
    edge[bi-1].append((ai-1, ci))
Q,K = map(int, input().split())
K = K-1
x,y = [],[]
for _ in range(Q):
    xi,yi = map(int, input().split())
    x.append(xi-1)
    y.append(yi-1)


dist = [float('inf')]*N # from K
visited = [False]*N
q = [K]
dist[K] = 0
visited[K] = True
while q:
    cur = q.pop()
    visited[cur] = True
    for nex,cost in edge[cur]:
        if not visited[nex]:
            q.append(nex)
            dist[nex] = dist[cur]+cost
#print(dist)
for xi,yi in zip(x,y):
    print(dist[xi] + dist[yi])

### FIXED CODE ###

# D
N = int(input())
edge = [[] for _ in range(N)]
for _ in range(N-1):
    ai,bi,ci = map(int, input().split())
    edge[ai-1].append((bi-1, ci))
    edge[bi-1].append((ai-1, ci))
Q,K = map(int, input().split())
K = K-1
x,y = [],[]
for _ in range(Q):
    xi,yi = map(int, input().split())
    x.append(xi-1)
    y.append(yi-1)


dist = [float('inf')]*N # from K
visited = [False]*N
q = [K]
dist[K] = 0
visited[K] = True
while q:
    cur = q.pop()
    visited[cur] = True
    for nex,cost in edge[cur]:
        if not visited[nex]:
            q.append(nex)
            dist[nex] = dist[cur]+cost
#print(dist)
for xi,yi in zip(x,y):
    print(dist[xi] + dist[yi])
n=int(input())
n,k=map(int,input().split())
a=list(map(int,input().split())) #横一列リスト
ans=0
for i in range(n):
    ans+=a[i]
if ans<=n:
    print(n-ans)
else:
    print('-1')

### FIXED CODE ###

import sys
input = sys.stdin.readline
def main():
  n,m=map(int,input().split())
  a=list(map(int,input().split())) #横一列リスト
  ans=0
  for i in range(m):
    ans+=a[i]
  if ans<=n:
      print(n-ans)
  else:
      print('-1')
main()
fun main()
{
    val given = readLine()!!
    println(if ( given.contains("AB") || given.contains("BA")) "Yes" else "No")
}

### FIXED CODE ###

s= input()
if "AB" in s or "BA" in s:
  print("Yes")
else:
  print("No")
a,b=map(int, input().split())
x=0
if a=b:
    print(a+b)
elif a>b:
    print(a+a-1)
else:
    print(b+b-1)

### FIXED CODE ###

a,b=map(int, input().split())
x=0
if a==b:
    x=a+b
elif a>b:
    x=a+a-1
else:
    x=b+b-1
print(x)
import numpy as np

N, K=map(int, input().split())
A=np.sort(list(map(int, input().split())))

p=np.sum(A>0)
q=np.sum(A<0)
Z=N-p-q
AP=A[-p:]
if q>0:
  AN=A[:q]

b=(N-Z)*Z+Z*(Z-1)//2
a=p*q

if K<=a:
  x=AP[-1]*AN[0]-1
  y=AP[0]*AN[-1]
  while y-x>1:
    tmp=(y+x)//2
    counter=np.searchsorted(AN, tmp/AP, side='right').sum()
    if counter<K:
      x=tmp
    else:
      y=tmp
  print(y)
elif K<=a+b:
  print(0)
else:
  K=K-a-b
  x=0
  y=10**18
  AN=AN[::-1]
  AN=-AN
  while y-x>1:
    tmp=(y+x)//2
    counter1=(np.searchsorted(AP, tmp//AP, side='right').sum()-np.searchsorted(AP, int(pow(tmp, 1/2)), side='right'))//2
    counter2=(np.searchsorted(AN, tmp//AN, side='right').sum()-np.searchsorted(AN, int(pow(tmp, 1/2)), side='right'))//2
    counter=counter1+counter2
    if counter<K:
      x=tmp
    else:
      y=tmp
  print(y)

### FIXED CODE ###

import numpy as np

N, K=map(int, input().split())
A=np.sort(list(map(int, input().split())))

p=np.sum(A>0)
q=np.sum(A<0)
Z=N-p-q
if p>0:
  AP=A[-p:]
else:
  AP=[]
if q>0:
  AN=A[:q]
else:
  AN=[]

b=(N-Z)*Z+Z*(Z-1)//2
a=p*q

if K<=a:
  x=AP[-1]*AN[0]-1
  y=AP[0]*AN[-1]
  while y-x>1:
    tmp=(y+x)//2
    counter=np.searchsorted(AN, tmp//AP, side='right').sum()
    if counter<K:
      x=tmp
    else:
      y=tmp
  print(y)
elif K<=a+b:
  print(0)
else:
  x=0
  y=10**18
  K=K-a-b
  if q<=1:
    while y-x>1:
      tmp=(y+x)//2
      counter=(np.searchsorted(AP, tmp//AP, side='right').sum()-np.searchsorted(AP, int(pow(tmp, 1/2)), side='right'))//2
      if counter<K:
        x=tmp
      else:
        y=tmp
    print(y)
    exit()
    
  AN=AN[::-1]
  AN=-AN
  
  if p<=1:
    while y-x>1:
      tmp=(y+x)//2
      counter=(np.searchsorted(AN, tmp//AN, side='right').sum()-np.searchsorted(AN, int(pow(tmp, 1/2)), side='right'))//2
      if counter<K:
        x=tmp
      else:
        y=tmp
    print(y)
    exit()
    
  while y-x>1:
    tmp=(y+x)//2
    counter1=(np.searchsorted(AP, tmp//AP, side='right').sum()-np.searchsorted(AP, int(pow(tmp, 1/2)), side='right'))//2
    counter2=(np.searchsorted(AN, tmp//AN, side='right').sum()-np.searchsorted(AN, int(pow(tmp, 1/2)), side='right'))//2
    counter=counter1+counter2
    if counter<K:
      x=tmp
    else:
      y=tmp
  print(y)
a, b = map(int, input().split())
print(max(a,b) + max(max(a,b), min(a,b))

### FIXED CODE ###

a, b = map(int, input().split())
print(max(a,b) + max(max(a,b)-1, min(a,b)))
import numpy as np
import sys


sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N, C = map(int, input().split())
    MAX = 10 ** 5 + 1
    vals = [0] * MAX
    for _ in range(N):
        s, t, c = map(int, input().split())
        vals[s] += 1
        vals[t + 1] -= 1
    cumsum = np.cumsum(vals)
    ans = max(cumsum)
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from collections import defaultdict
import numpy as np
import sys


sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def main():
    N, C = map(int, input().split())
    MAX = 10 ** 5 + 2
    vals = [0] * MAX
    D = defaultdict(list)
    for _ in range(N):
        s, t, c = map(int, input().split())
        D[c].append((s, t))

    for k, v in D.items():
        prev = -1
        v.sort(key=lambda x: x[0])
        for s, t in v:
            if prev == s:
                vals[prev + 1] += 1
                vals[t + 1] -= 1
            else:
                vals[s] += 1
                vals[t + 1] -= 1
            prev = t

    cumsum = np.cumsum(vals)
    ans = max(cumsum)
    print(ans)


if __name__ == "__main__":
    main()
a, b c = map(int, input().split())

if a >= b:
  x = a // b
  if x >= c:
    print(c)
  else:
    print(x)
else:
  print(0)

### FIXED CODE ###

a, b, c = map(int, input().split())
 
if a <= b:
  x = b // a
  if x >= c:
    print(c)
  else:
    print(x)
else:
  print(0)
K = int(input())
print( K//2 * (N - K//2))

### FIXED CODE ###

K = int(input())
print( K//2 * (K - K//2))
src = input().split()
k = int(src[0])
x = int(src[1])
min = x-k+1
max = x+k-1
print(list(range(min,max+1)

### FIXED CODE ###

src = input().split()
k = int(src[0])
x = int(src[1])
a = ''
min = x-k+1
max = x+k-1
pos = list(range(min,max+1))
for i in pos:
  a = a + str(i) + ' '
print(a)
W,H,N=map(int,input().split())
x1=0
x2=W
y1=0
y2=H
for i in range(N):
    x,y,a=map(int,input().split())
    if a==1:
        x1=max(x1,x)
    elif a==2:
        x2=min(x,x2)
    elif a==3:
        y1=max(y1,y)
    elif a==4:
        y2=min(y,y2)
if x2<x1 or y2<y1:
    print(0)
    sys.exit()
xx=x2-x1
yy=y2-y1
print(xx*yy)

### FIXED CODE ###

W,H,N=map(int,input().split())
x1=0
x2=W
y1=0
y2=H
for i in range(N):
    x,y,a=map(int,input().split())
    if a==1:
        x1=max(x1,x)
    elif a==2:
        x2=min(x,x2)
    elif a==3:
        y1=max(y1,y)
    elif a==4:
        y2=min(y,y2)
if x2<x1 or y2<y1:
    print(0)
    exit()
xx=x2-x1
yy=y2-y1
print(xx*yy)
import math
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(math.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):
    xright.append(math.gcd(xright[n-i-2],lst[i]))

print(xright,left)
#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(1,n-1):
    a=math.gcd(left[i-1],xright[n-i-2])
    if a>result:
        result=a
print(max(result,xright[n-2],left[n-2]))


### FIXED CODE ###

import fractions
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(fractions.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):
    xright.append(fractions.gcd(xright[n-i-2],lst[i]))


#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(1,n-1):
    a=fractions.gcd(left[i-1],xright[n-i-2])
    if a>result:
        result=a
print(max(result,xright[n-2],left[n-2]))
a, b = map(int, input().split())

a * b = c

print(c)

### FIXED CODE ###

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

c = a * b

print(c)
import numpy as np

N = int(input())  

A = np.zeros(N) 
B = np.zeros(N) 

for i in range(N):
    A[i], B[i] = map(int, input().split())
    
B1 = B[np.argsort(B)]

ans = "Yes"
 
k = 0
for i in range(N):
    k += A[B1[i]]
    if k > B[B1[i]]:
        ans = "No"
 
print(ans)

### FIXED CODE ###

import numpy as np

N = int(input())  

A = np.zeros(N) 
B = np.zeros(N) 

for i in range(N):
    A[i], B[i] = map(int, input().split())
    
B1 = np.argsort(B)

ans = "Yes"
 
k = 0
for i in range(N):
    k += A[B1[i]]
    if k > B[B1[i]]:
        ans = "No"
 
print(ans)
n,x=map(int,input().split.())
a=list(int(input()) for _ range(n))
print(n+(x-sum(a))//min(a))

### FIXED CODE ###

n,x=map(int,input().split())
a=list(int(input()) for _ in range(n))
print(n+((x-sum(a))//min(a)))
mod = 10**9 + 7
def go(v):
    global tmp
    tmp += 1
    used[v] = True
    for i in range(len(g[v])):
        if not used[g[v][i]]:
            go(g[v][i])
def solve():
    n, m = map(int, input().split())
    global g, used, tmp
    tmp = 0
    g = [[] for i in range(n + 1)]
    ans = 0
    used = [False for i in range(n + 1)]
    for i in range(m):
        x, y = map(int, input().split())
        if y not in g[x]:
            g[x].append(y)
            g[y].append(x)
    for i in range(1, n + 1):
        if not used[i]:
            tmp = 0
            go(i)
            ans = max(ans, tmp)
    print(ans)
t = 1
while t > 0:
    solve()
    t -= 1

### FIXED CODE ###

import sys
sys.setrecursionlimit(200001)
mod = 10**9 + 7
def go(v):
    global tmp
    tmp += 1
    used[v] = True
    for i in range(len(g[v])):
        if not used[g[v][i]]:
            go(g[v][i])
def solve():
    n, m = map(int, input().split())
    global g, used, tmp
    tmp = 0
    g = [[] for i in range(n + 1)]
    ans = 0
    d = {}
    used = [False for i in range(n + 1)]
    for i in range(m):
        x, y = map(int, input().split())
        if (x, y) not in d:
            g[x].append(y)
            g[y].append(x)
            d[(x, y)] = 1
    for i in range(1, n + 1):
        if not used[i]:
            tmp = 0
            go(i)
            ans = max(ans, tmp)
    print(ans)
t = 1
while t > 0:
    solve()
    t -= 1
N = int(input())
S = input()
    cnt = 0
    for i in range(1, N):
        # スライスで部分文字列をつくって、set型に変換し、積集合で共通する英小文字を取得
        dup_cnt = set(S[:i]) & set(S[i:])
        # 共通する英小文字の数が現時点での最大値より大きいなら最大値を更新
        if cnt < len(dup_cnt):
            cnt = len(dup_cnt)
    print(cnt)


### FIXED CODE ###

n = int(input())
s = input()
Max = 0
for i in range(1, len(s)): # i = 1
    length = len(set(s[:i]) & set(s[i:]))
    if length > Max:
        Max = length
print(Max)
c = x // d
# 必要な移動回数
k_r = k - c
# 移動した後の残りの移動回数
ans_2 = x - d * c
#残り移動回数が偶数のときのｘからの距離

if c >= k:
    print(x - k * d )
    exit()

x_l = x - d * c
#ｘまでの残りの距離

if k_r % 2 == 0:
    print(ans_2)
    exit()
else :
    x_l -= d
    x_l =abs(x_l)
    print(x_l)

### FIXED CODE ###

x ,k ,d = map(int,input().split())

x = abs(x)
c = x // d
# 必要な移動回数
k_r = k - c
# 移動した後の残りの移動回数
ans_2 = x - d * c
#残り移動回数が偶数のときのｘからの距離

if c >= k:
    print(x - k * d )
    exit()

x_l = x - d * c
#ｘまでの残りの距離

if k_r % 2 == 0:
    print(ans_2)
    exit()
else :
    x_l -= d
    x_l =abs(x_l)
    print(x_l)
def main():
    d,n = map(int, input().split())
    a_list = []
    
    if d == 0:
        for i in range(0,100):
            a_list.append(i)

    elif d == 1:
        for i in range(100, 10000, 100):
            a_list.append(i)
    else:
        for i in range(10000, 1000000, 10000):
            a_list.append(i)

    #print(n-1)
    print(a_list[n-1])
    #print(len(a_list))
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

d,n = map(int,input().split())
li = []
for i in range(1,102):
    if i != 100:
        li.append(i*100**d)
print(li[n-1])