peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
A,B,C = map(int, input().split())
K = int(input())
D = B
E = C
i1 = 0
i2 = 0
while(D<=A):
    D = D*2
    i1 +=1
while(E<=D):
    E = E*2
    i2 +=1
if K >= i1+i2+1:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
a=input()
print("A" if a.isupper else "a")
# Judge status: Wrong Answer
s = input()
# aabbaa

ans = 1 if s[-1] != s[-2] else 0
prev = ""
i = 0
while i < len(s) - 1: # i < 4
    if prev != s[i]:
        ans += 1
        prev = s[i]
        i += 1
    else:
        ans += 1
        prev = s[i:i+2]
        i += 2

print(ans)
# Judge status: Accepted
a, b, c = map(int, input().split())
if 4 * (a * b) < (c - a - b)**2 and (c - a - b) > 0:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
ans=0
now=-2
for a in A:
    ans+=B[a-1]
    if a==now+1:
        ans+=C[now-1]
    now=a
print(ans)
# Judge status: Wrong Answer
n,m = map(int , input().split())
li=[]
for i in range(n):
 li.append(input())
sorted(li)
st=''
for e in li:
    st=st+e
print(st)
# Judge status: Accepted
S = input()
A = [0] * (len(S) + 1)

for i in range(len(S)):
    if S[i] == "<":
        A[i + 1] = max(A[i + 1], A[i] + 1)

for i in reversed(range(len(S))):
    if S[i] == ">":
        A[i] = max(A[i], A[i + 1] + 1)

print(sum(A))
# Judge status: Accepted
def main():

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

    for i in range(K, len(A)):
        if A[i-K] < A[i]:
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    main()
# Judge status: Accepted
import math

N = int(input())

ans = math.ceil(N/1.08)

if math.floor(ans * 1.08) != N:
    print(':(')
else:
    print(ans)
# print(math.ceil(N/1.08))
# print(int(math.ceil(N/1.08)*1.08))
# Judge status: Wrong Answer
n=int(input())
num=n
shisuu=1
ans=""
while num>0:
  num-=26**shisuu
  shisuu+=1
  
for i in range(shisuu-2,-1,-1):
  ans+=chr(ord("a")-1+n//(26**i))
  n=n%(26**i)

print(ans)
# Judge status: Wrong Answer
n = int(input())
b = list(map(int,input().split()))
ans = 0
aa = 0
ab = 0
for i in range(n-1):
    aa = min(ab,b[i])
    ab = b[i]
    ans += aa
print(ans+ab)
# Judge status: Accepted
NAB = list(map(int, input().split()))

cluster = NAB[1] + NAB[2]
q, mod = divmod(NAB[0], cluster)

q *= NAB[1]
q += NAB[1] if (NAB[1] < mod) else mod

print(q)
# Judge status: Wrong Answer
txt = list(input())
count = 1
hitotsu = True
a = txt.pop(0)
while(len(txt) != 0):
  #print(txt, count)
  if hitotsu:
    if a != txt[0]:
      a = txt.pop(0)
      gitotsu = True
    else:
      if len(txt) >= 2:
        a = txt.pop(0)
        a += txt.pop(0)
        hitotsu = False
        count += 1
      else:
        count += 1
        break
  else:
    a = txt.pop(0)
    hitotsu = True
    count += 1
print(count)
# Judge status: Wrong Answer
K = int(input())

def lunlun(n):
    x = str(n)
    if len(x)==1:
        return True
    else:
        for i in range(len(x)-1):
            if abs(int(x[i])-int(x[i+1]))>1:
                return False
        else:
            return True

i = 0
j = 0
while i<K:
  if lunlun(j):
    i +=1
  j += 1

print(j)
# Judge status: Accepted
# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

n,*a = map(int,read().split())

a.sort()
res = []
while a and len(res) < 2:
    #print(a,res)
    if len(a) >= 2 and a[-1] == a[-2]:
        res.append(a[-1])
        a.pop()
        a.pop()
    else:
        a.pop()

#print(res)

if len(res) == 2:
    print(res[0]*res[1])
else:
    print(0)
# Judge status: Accepted
R = int(input())
ennsyuu = R * 6.28318530717958623200
print(ennsyuu)
# Judge status: Accepted
# -*- coding: utf-8 -*-
"""
Created on Sat Apr  4 21:05:12 2020

@author: Kanaru Sato
"""

n,m = list(map(int, input().split()))
a = list(map(int, input().split()))
sum = 0

for i in range(len(a)):
    sum += a[i]
    
a.sort(reverse=True)

if a[m-1] < sum/(4*m):
    print("No")
else:
    print("Yes")
# Judge status: Accepted
def solve():
    X = int(input())
    lower = 400
    upper = 599
    rank = 8
    for _ in range(8):
        if lower <= X <= upper:
            print(rank)
            return
        
        lower += 200
        upper += 200
        rank -= 1

if __name__ == '__main__':
    solve()
# Judge status: Accepted
x, y = list(map(int, input().split()))

a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
c = [2]


if ((x in a) and (y in a)) or ((x in b) and (y in b)) or ((x in c) and (y in c)):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
n = int(input())

a = []
b = []
for i in range(n):
    a_num, b_num = map(int, input().split())
    a.append(a_num)
    b.append(b_num)
    
cnt = 0
for i in reversed(range(n)):
    if a[i] % b[i] == 0:
        continue
        
    r = (a[i] + cnt) // b[i] + 1
    #print('a', a[i]+ cnt, b[i], r)
    cnt += r * b[i] - (a[i] + cnt)
    #print('c', r * b[i], a[i] + cnt, cnt)
    
print(cnt)
# Judge status: Accepted
n=int(input())
*a,=map(int,input().split())
a.sort(reverse=True)
A=a[::2]
B=a[1::2]
print(sum(A)-sum(B))
# Judge status: Accepted
s=sorted(input())
t=sorted(input(),reverse=True)

print("Yes" if s<t else "No")
# Judge status: Accepted
from bisect import bisect
n = int(input())
a = list(map(int, input().split()))

a.sort()

i = bisect(a, (a[-1]+1) // 2)

if a[i] - a[-1] / 2 < a[-1] / 2 - a[i-1]:
    print(a[-1], a[i])
else:
    print(a[-1], a[i-1])
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))

stock = 0
money = 1000

for i in range(n-1):
    if a[i] < a[i+1]:
        stock = money // a[i]
        money -= stock * a[i]
    elif a[i] > a[i+1]:
        money += stock * a[i]
        stock = 0

money += stock * a[n-1]

print(money)
# Judge status: Accepted
n, m = map(int,input().split())
if n == 1 and m == 1:
    print(1)
elif n == 1 and m == 2:
    print(0)
elif n == 2 and m == 1:
    print(0)
elif n == 1:
    print(m-2)
elif m == 1:
    print(n-2)
elif n == 2 or m == 2:
    print(0)
else:
    print((m-2)*(n-2))
# Judge status: Accepted
a,b,k = map( int,input().split() )

i = min(a,b)
ans = 0
while 1:
  if not(a % i)  and not(b % i):
    ans += 1
  if ans == k:
    break
  i -= 1

print(i)
# Judge status: Wrong Answer
import math

N = int(input())
cnt = 0
root = math.sqrt(N)

if float.is_integer(root):
    finish = int(root-1)
else:
    finish = int(root)
root = int(root)
if root<2:
    z = root+1
else:
    z = root
for a in range(1,z):
    # print(a, (N-1)//a - a)
    cnt += (N-1)//a - a
if root<2:
    print(cnt*2+finish)
else:
    print(cnt*2+finish)
# Judge status: Accepted
n = int(input())
A = tuple(map(int, input().split()))
A = sorted(A, reverse=True)

from collections import Counter
CA = Counter(A)

b = 0
for a in A:
    if CA[a] >= 2:
        CA[a] -= 2
        b = a
        break
c = 0
for a in A:
    if CA[a] >= 2:
        c = a
        break

print(b*c)
# Judge status: Accepted
N, K = map(int, input().split())
cand1 = N % K
cand2 = K - (N % K)
print(min(cand1, cand2))
# Judge status: Wrong Answer
S, T = input().split()
print(S + T)
# Judge status: Wrong Answer
import sys
#sys.exit()
#sorted( ,reverse=True)
#N = int(input())
A,B = map(str, input().split())
A = int(A)
B = B.replace('.','')
B = int(B)
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
C = A * B / 100
#cnt = 0
#cnt += 1



#print(N)
#print(A,B)
#print(A*B)
#print(A*B/100)
#print(C)
#print(A)
#print('Yes')
#print('No')
print(int(C))
# Judge status: Accepted
A, B, T = map(int, input().split())

print(int((T+0.5)//A * B))
# Judge status: Wrong Answer
import collections

n = int(input())
s = []
for i in range(n):
    s.append(input())

s.sort()
most = collections.Counter(s)

most_ans = most.most_common()
most_cnt = most_ans[0][1]
for i in most_ans:
    if most_cnt == i[1]:
        print(i[0])
# Judge status: Accepted
import numpy as np
n, m, x = map(int, input().split())
lst = np.array([np.array(list(map(int, input().split()))) for _ in range(n)])
ans = float('inf')
for i in range(1<<n):
    eff = np.array([0] * (m+1))
    for j in range(n):
        if i>>j&1==1:
            eff += lst[j]
    cost = eff[0]
    eff = eff[1:]
    if np.all(eff >= x):
        ans = min(ans, cost)
if ans == float('inf'):
    print(-1)
else:
    print(ans)
# Judge status: Accepted
A, B, C = map(int, input().split())
K = int(input())

ans = "No"

def ABC(int1, int2, int3):
    if int1 < int2 < int3:
        return True
    else:
        return False

if ABC(A, B, C):
    ans = "Yes"
else:
    for k in range(K):
        if B <= A:
            B = B * 2
        elif C <= B:
            C = C * 2
        
        if ABC(A, B, C):
            ans = "Yes"
            break

print(ans)
# Judge status: Accepted
s = input()

if s[2] == s[3] and s[4] == s[5]:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
K=int(input())

if K%2==0:
	print(K//2*K//2)
else:
	print((K//2)*((K//2)+1))
# Judge status: Wrong Answer
a, b = map(int, input().split())
if a >= b:
    print(a)
else:
    print(a-1)
# Judge status: Accepted
Q, H, S, D = map(int, input().split())
N = int(input())

l = min(Q*4, H*2, S)
ll = min(l*2, D)
res = N//2*ll
if N % 2 == 1:
    res += l

print(res)
# Judge status: Accepted
N=int(input())
s=[input() for i in range(N)]
M=int(input())
t=[input() for i in range(M)]
s2=list(set(s))
counter=0
for i in range(len(s2)):
    if s.count(s2[i])-t.count(s2[i])>counter:
        counter=s.count(s2[i])-t.count(s2[i])

print(counter)
# Judge status: Wrong Answer
import math
H = int(input())
monster_num = 1
attack = 0
while H > 1:
    attack = attack + monster_num * 1
    H = math.ceil(H/2)
    monster_num = monster_num * 2

print(monster_num + attack)
# Judge status: Accepted
def main():
    N, M = map(int, input().split())
    A = set([int(input()) for _ in range(M)])
    ways = [0] * (N+1)
    ways[0] = 1
    for i in range(1, N+1):
        if i not in A:
            ways[i] = ways[i-1] + ways[i-2]

    print(ways[N] % 1000000007)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n = int(input())
a = n % 10
b = ((n - a) // 10) % 10
c = ((n - a - 10 * b) // 10) % 10
if (a == 7 or b == 7 or c == 7) :
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N = int(input())
W = list(map(int, input().split()))
ans = float('inf')
for i in range(N):
  l = sum(W[:i])
  r = sum(W[i:])
  if ans > abs(l-r):
    ans = abs(l-r)
print(ans)
# Judge status: Wrong Answer
X = int(input())
for A in range(100):
    B5 = A**5-X
    for B in range(-100, 100):
        if B**5 == B5:
            print(A, B)
            exit()
# Judge status: Accepted
a=input()
b=input()
if a[::-1]==b:
    print("YES")
else:
    print("NO")
# Judge status: Wrong Answer
from math import ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    A,B = map(int, readline().split())

    x1 = ceil(A / 0.08)
    x2 = ceil(B / 0.1)
    print(x1, x2)

    if int(x1 * 0.1) == B:
        print(x1)
    elif int(x2 * 0.08) == A:
        print(x2)
    else:
        print(-1)


if __name__ == "__main__":
    main()
# Judge status: Accepted
# スペース区切りの整数の入力
D, T, S = map(int, input().split())
#積計算
# times = a*b
# 出力
if S*T < D:
	print("No")
else:
	print("Yes")
# Judge status: Accepted
d,n=map(int, input().split())
print(100**d*n if n!=100 else 100**d*(n+1))
# Judge status: Accepted
n,a,b = map(int,input().split())

def modComb(n,r,mod):
    tmp = 1
    r = min(r,n-r)
    for i in range(1,r+1):
        tmp = tmp * (n-i+1) % mod
        tmp = tmp * pow(i,mod-2,mod)
    
    return tmp % mod


mod = 10**9+7
ans = pow(2,n,mod) - 1

print((ans-modComb(n,a,mod)-modComb(n,b,mod)) % mod)
# Judge status: Accepted
n = input()
m = input()

if len(n) + 1 == len(m) and n == m[:len(n)]:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
a, b = map(int, input().split())
cnt = a-1
if a <= b:
    cnt += 1
print(cnt)
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
money=1000
for i in range(N-1):
    stock=0
    if A[i]<A[i+1]:
        stock=money//A[i]
        money+=(A[i+1]-A[i])*stock
print(money)
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))

a = A.index(1)
ans = int((N-2) / (K-1)) + 1
print(ans)
# Judge status: Accepted
A, B = map(int, input().split())
A = (A + 11) % 13
B = (B + 11) % 13
print('Alice' if A > B else ('Bob' if B > A else 'Draw'))
# Judge status: Accepted
import numpy as np
ans=1000000000000
N=int(input())
for i in range(1,int(np.sqrt(N)+1)):
    if (N%i==0):
        j=N//i
        move=(i-1)+(j-1)
        ans=min(ans,move)
print(ans)
# Judge status: Accepted
N = int(input())

ans = 0

if N % 2 == 0:
    num = 5
    temp_N = N//2
    while num <= temp_N:
        ans += temp_N//num
        num *= 5

print(int(ans))
# Judge status: Accepted
n,k=map(int,input().split())
d=list(map(int,input().split()))
for i in range(n,n*10+1):
  if all(d.count(int(j))==0 for j in str(i)):
    print(i)
    exit()
# Judge status: Wrong Answer
n = int(input())
ans = 0
for i in range(n):
    if i % 3 != 0 and i % 5 != 0:
       ans += i
print(ans)
# Judge status: Accepted
a, b, m =  map(int, input().split())
aa = list(map(int, input().split()))
bb = list(map(int, input().split()))
x = [list(map(int, input().split())) for _ in range(m)]
ln = []
for i in range(m):
    ln.append(aa[x[i][0] - 1] + bb[x[i][1] - 1] - x[i][2])
ln.append(min(aa) + min(bb))
print(min(ln))
# Judge status: Wrong Answer
O = input()
E = input()
print(''.join(S+T for S,T in zip(O,E)))
# Judge status: Wrong Answer
S = list(input())

ans = []

A = int(S[0] + S[1])
B = int(S[2] + S[3])

if (1 <= A <= 12 and 1 <= B <= 12):
  print("AMBIGUOUS")
elif (1 <= A <= 12 and 13 <= B <= 99):
  print("MMYY")
elif (1 <= B <= 12 and 13 <= A <= 99):
  print("YYMM")
else:
  print("NA")
# Judge status: Accepted
N, M = map(int, input().split())
print(M // 2 if N >= M // 2 else N + (M-N*2)//4)
# Judge status: Wrong Answer
K, A, B = map(int, input().split())

if A >= B+2:
    print(K+1)
else:
    ans = 1 + (K-A+1) * ((B-A) // 2) + (B-A)%2 
    print(max(K+1,ans))
# Judge status: Accepted
def main():
    D, N = map(int, input().split())
    h = 100
    if N == 100:
        print((100**D)*101)
    else:
        print((100 ** D)*N)
main()
# Judge status: Accepted
a, b, c = map(int, input().split())

if a+b == c or a+c == b or b+c == a:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import numpy as np

N, M = map(int, input().split())
A = np.array([[i for i in input()] for j in range(N)])
B = np.array([[i for i in input()] for j in range(M)])

found = False
for i in range(N-M+1):
    for j in range(N-M+1):
        P = A[i:i+M,j:j+M]
        if (P == B).all():
            print("Yes")
            found = True
            break
if not found:
    print("No")
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
num = {}
ans = []
for i in range(1,len(A)+1):
    num[A[i-1]]=i
    print(num)
num = sorted(num.items())
print(num)
for k,v in num:
    ans.append(str(v))
print(' '.join(ans))
# Judge status: Wrong Answer
import sys
MOD = 10 ** 9 + 7

n, m, *broken = map(int, sys.stdin.read().split())
broken = set(broken)

def main():
    ways = [0] * (n + 1)
    ways[0] = 1
    ways[1] = not 1 in broken
    for i in range(2, n + 1):
        ways[i] = (not i in broken) * (ways[i-1] + ways[i-2]) % MOD
    print(ways[n])

if __name__ ==  '__main__':
    main()
# Judge status: Accepted
import itertools

n = int(input())
p_list = list(map(int, input().split()))
q_list = list(map(int, input().split()))

result = list(itertools.permutations([i for i in range(1, n+1)], n))
# 中身がtuppleなのでlistに変換
result = list(map(lambda x: list(x), result))
a = result.index(p_list)
b = result.index(q_list)
print(abs(a-b))
# Judge status: Accepted
X=int(input())
i=100
year=0
while i<X:
  i+=i//100
  year+=1
print(year)
# Judge status: Wrong Answer
N, M = map(int, input().split())
idcard = [[int(j) for j in input().split()] for i in range(M)]
for i in range(1,M):
    idcard[i] = [idcard[i][0], idcard[i-1][1]]
    
print(idcard[M-1][1]-idcard[M-1][0] + 1)
# Judge status: Accepted
def main():
    N = int(input())
    S = list(input())
    if N%2 != 0:
        print("No")
    else:
        N = N//2
        if S[:N] == S[N:]:
            print("Yes")
        else:
            print("No")
    return 0
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import itertools

n = int(input())

cl = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", ]
rl = itertools.product(cl[:n], repeat=n - 1)
if not rl:
    print("a")
else:
    for r in rl:
        print("".join(["a"] + list(r)))
# Judge status: Wrong Answer
import sys
read_=sys.stdin.buffer.readline

N=int(read_())
A=input().split()

if len(A)==1:
    print(A[0])
    exit()
    
B1=A[::2]
B2=A[1::2]

print(B1,B2)
if N%2==0:
    B2.reverse()
    B2.extend(B1)
    print(' '.join(B2))
else:
    B1.reverse()
    B1.extend(B2)
    print(' '.join(B1))
# Judge status: Accepted
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


D = z()
C = zz()
S = defaultdict(list)
for i in range(D):
    S[i+1] = zz()
for i in range(D):
    print(np.argmax(S[i+1]) + 1)
# Judge status: Accepted
import sys
input = sys.stdin.readline

def main():
    a, b = map(int, input().split())
    height = sum(list(range(b-a)))
    print(height - a)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N, K = map(int, input().split())
p_list = list(map(int, input().split()))

c_s_list = [] #Cumulative sum_list
c_sum = 0 #Cumulative sum
for dice in p_list:
    average = (dice + 1) / 2 #ダイスの期待値
    c_sum += average
    c_s_list.append(c_sum)

ans = 0
for i in range(N-K):
    tmp = c_s_list[i+K] - c_s_list[i]
    if tmp >= ans:
        ans = tmp
print(ans)
# Judge status: Accepted
n,m=map(int,input().split())
mList=set([int(input()) for _ in range(m)])

dp=[0]*(n+1)
dp[0]=1
if 1 not in mList:
  dp[1]=1

for i in range(2,n+1):
  if i in mList: continue
  dp[i]+=dp[i-1]
  dp[i]+=dp[i-2]
  dp[i]%=1000000007

print(dp[n])
# Judge status: Accepted
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


s = input()
prev = ""
ans = 0
n = len(s)
i = 0
while i<n:
    if s[i]==prev:
        if i+1<n:
            ans += 1
            prev = s[i]+s[i+1]
        i += 2
    else:
        prev = s[i]
        i += 1
        ans += 1
#     print(prev)
print(ans)
# Judge status: Wrong Answer
import math

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

L = A.index(1)
R = N - (L + 1)

ans = math.ceil(L/(K-1)) + math.ceil(R/(K-1))

print(ans)
# Judge status: Accepted
X,Y=list(map(int,input().split()))

i=1
while Y>=2**i*X:
  i=i+1
print(i)
# Judge status: Wrong Answer
H = int(input())
W = int(input())
N = int(input())
if W >= H:
    print((N - N % H)// W + 1) 
else:
    print((N - N % W)// H + 1)
# Judge status: Accepted
a = list(list(map(int,input().split())) for _ in range(3))
n = int(input())
b = list(int(input()) for _ in range(n))

for i in range(3):
    for j in range(3):
        if a[i][j] in b:
            a[i][j] = 0

for i in range(3):
    if a[i][0] == a[i][1] == a[i][2] or a[0][i] == a[1][i] == a[2][i] or a[0][0] == a[1][1] == a[2][2] or a[2][0] == a[1][1] == a[0][2]:
        print("Yes")
        break
else:
     print("No")
# Judge status: Accepted
n=int(input())
x=list(map(int,input().split()))
y=sorted(x[:])
l=y[n//2-1]
r=y[n//2]
for xx in x:
  print(l if xx>=r else r)
# Judge status: Accepted
import sys
import math
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N = int(input())
    ans = math.factorial(N)%MOD
    print(ans)



if __name__ == '__main__':
    main()
# Judge status: Accepted
a, b = map(int, input().split())

n1 = int(str(a)*b)
n2 = int(str(b)*a)

if a >= b:
  print(n2)
else:
  print(n1)
# Judge status: Wrong Answer
n = int(input())
cnt = 0
if n%2!=0:
    print(0)
else:
    n = n//2
    tp = 5
    while n>=tp:
        cnt += n//tp
        tp *=5
print(cnt)
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
L=[0]*N
for i in range(N):
    L[A[i]-1]=i+1
L=[str(a) for a in L]
print(' '.join(L))
# Judge status: Accepted
from math import gcd

if __name__ == '__main__':
    n = int(input())
    count = 1
    result = 0

    while count <= n:
        for i in range(1, n + 1):
            for j in range(1, n + 1):
                # print(f"gcd({count}, {i}, {j})")
                result += gcd(count, gcd(i, j))
        count += 1

    print(result)
# Judge status: Accepted
h1, m1,h2,m2,k = map(int, input().split())

hm=(h2*60+m2)-(h1*60+m1)-k
print (hm)
# Judge status: Accepted
x,y,z = map(int,input().split())

print(z,x,y)
# Judge status: Accepted
n = int(input())
s = input()

chg = [0]*n

cnt = 0
for i in range(1, n):  # 左側から
    if s[i-1] == 'W':
        cnt += 1
    chg[i] += cnt

cnt = 0
for i in range(1, n):  # 右側から
    if s[-i] == 'E':
        cnt += 1
    chg[-1-i] += cnt
    
print(min(chg))
# Judge status: Accepted
n, k = map(int, input().split())
if n%k == 0:
    print(0)
else:
    print(1)
# Judge status: Accepted
A, B, C = map(int, input().split())

if len(set([A, B, C])) == 2:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
x=int(input())
b=0;
lst=[]
acs=0
was=0
res=0
tles=0
while(b<x):
    new=input()
    lst.append(new)
    b+=1
for c in lst:
    if(c=='AC'):
        acs+=1
    if(c=='WA'):
        was+=1
    if(c=='RE'):
        res+=1
    if(c=='TLE'):
        tles+=1
print('AC x '+str(acs))
print('WA x '+ str(was))
print('RE x ' +str(res))  
print('TLE x ' +str(tles))
# Judge status: Accepted
import math

a,b,h,m = input().split()
a,b,h,m = int(a),int(b),int(h),int(m)
asin = a * math.sin(math.radians(90-30*h-0.5*m))
acos = a * math.cos(math.radians(90-30*h-0.5*m))
bsin = b * math.sin(math.radians(90-6*m))
bcos = b * math.cos(math.radians(90-6*m))
d = math.sqrt((asin - bsin)**2 + (acos - bcos)**2)
print(d)
# Judge status: Accepted
def solve():
  N, K = map(int, input().split())
  S = input()
  cnt = 1
  for i in range(N-1):
    if S[i]!=S[i+1]:
      cnt += 1
  ans = N-max(1,cnt-K*2)
  return ans
print(solve())
# Judge status: Accepted
from math import ceil
n,h = map(int,input().split())
aa = [0]*n
bb = [0]*n
for i in range(n):
    a,b = map(int,input().split())
    aa[i] = a
    bb[i] = b
m = max(aa)
bb.sort(reverse=True)
ans = 0
dmg = 0

for i in range(n):
    if bb[i] < m or dmg >= h:
        break
    dmg += bb[i]
    ans += 1

if dmg < h:
    ans += ceil((h-dmg)/m)

print(ans)
# Judge status: Wrong Answer
n,m = map(int,input().split())
l = []
s = ""
tmp = 1
for i in range(m):
  p,y = map(str,input().split())
  l.append([p.zfill(6),y,i+1])
  
l = sorted(l, key=lambda x:(x[0],x[1]))

for i in range(m):
  s = ""
  if i == 0 or l[i-1][0] != l[i][0]:
    tmp = 1
  else:
    tmp += 1
  s = l[i][0] + str(tmp).zfill(6)
  l[i].append(s)
    
l = sorted(l, key=lambda x:(x[2]))

for i in range(m):
  print(l[i][3])
# Judge status: Accepted
s = input()
q = int(input())
f = []
b = []
h = 0

for i in range(q):
    a = list(input().split())
    if a[0] == "1":
        f, b = b, f
        h = 1 - h
    elif len(a) >= 3:
        if a[1] == "1":
            f.append(a[2])
        elif a[1] == "2":
            b.append(a[2])

if h == 0:
    print("".join(f[::-1]) + s + "".join(b))
else:
    print("".join(f[::-1]) + s[::-1] + "".join(b))
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
n=input().strip()
ans=0
nxt=0
for i in range(len(n)):
    a=int(n[-i-1])+nxt
    #print(a)
    if a<=5:
        ans+=a
        nxt=0
    elif 6<=a<=9:
        ans+=10-a
        nxt=1
    elif a==10:
        ans+=10-a-1
    #print(ans)
a=nxt
if a<=5:
    ans+=a
elif a>=6:
    ans+=10-a
print(ans)