peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n = int(input())
alst = list(map(int, input().split()))
if 1 not in alst:
  print(-1)
  exit()

ans = 0
for num in alst:
    if num == ans + 1:
        ans += 1
else:
    print(n - ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = 0
for i in range(n):
    if b[i] <= a[i]:
        c = c + b[i]
    else:
        c = c + a[i] + min(b[i]-a[i],a[i+1])     
print(c)
# Judge status: Wrong Answer
N=int(input())
S=input()
ans=0
for i in range(N):
    X=list(S[:i])
    Y=list(S[i+1:])
    ans=max(ans,len(set(X)&set(Y)))
    
print(ans)
# Judge status: Accepted
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

    N,A,B=map(int,input().split())
    if A>B:
        print(0)
    elif N==1:
        if A!=B:
            print(0)
        else:
            print(1)
    elif N>=2:
        res=N-2
        print(B*res-A*res+1)


resolve()
# Judge status: Accepted
s=list(input())
while len(s)!=0:
  s.pop(len(s)-1)
  if s[:len(s)//2]*2==s:
    break
print(len(s))
# Judge status: Accepted
a,b,c,x,y = map(int,input().split())

ans = a*x+b*y

for i in range(10**5+1):
  tmp = 2*c*i+max(0,x-i)*a+max(0,y-i)*b
  ans = min(ans,tmp)
  
print(ans)
# Judge status: Accepted
n,h = map(int,input().split())
a = []
b = []
ans = 0
for i in range(n):
    A,B = map(int,input().split())
    a.append(A)
    b.append(B)
b = sorted(b, reverse=True)
a_max = max(a)
for i in b:
    if h>0:
        if i>a_max:
            h-=i
            ans+=1
    else:
        print(ans)
        exit()
if h<0:
    print(ans)
else:
    ans += -(-h//max(a))
    print(ans)
# Judge status: Accepted
n = int(input())
res = 0
list_ = [[0 for j in range(10)] for i in range(10)]
for i in range(1, n + 1):
    s = list(str(i))
    initl = int(s[0])
    end = int(s[-1])
    list_[initl][end] += 1
for i in range(1, 10):
    for j in range(1, 10):
        res += list_[i][j] * list_[j][i]
print(res)
# Judge status: Accepted
a,b,c = map(int, input().split())
if c - a - b < 0:
    print("No")
    exit()
if 4*a*b < (c-a-b)**2:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
print("YNeos"[int(input())<30::2])
# Judge status: Accepted
def main():
    n = int(input())
    L = []
    for _ in range(n):
        x,l = map(int,input().split())
        L.append([x+l,x-l])

    L.sort()

    cnt = 0
    right = -10**9
    for r,l in L:
        if right <= l:
            cnt += 1
            right = r

    print(cnt)

main()
# Judge status: Accepted
h,n = map(int,input().split())
a = list(map(int,input().split()))

sum=0

for i in range(n):
    sum += a[i]

if h <= sum:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n=int(input())
a=[int(x) for x in input().rstrip().split()]
ans=[0 for i in range(n)] 
for i in range(n):
    ans[a[i]-1]=i+1
print(*ans)
# Judge status: Accepted
from math import ceil

n = int(input())
print(ceil(n/2)/n)
# Judge status: Accepted
#coding:utf-8
from math import gcd

def main():
    k = int(input())
    ans = 0

    for a in range(1, k+1):
        for b in range(1, k+1):
            for c in range(1, k+1):
                ans += gcd(gcd(a, b), c)

    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
x,y=map(int,input().split())
a=y
a -= 2*x
if a < 0 or a >= 2*x:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
K = int(input())
r = [[] for _ in range(10)]
r[0] = list(range(1,10))
for i in range(9):
    for a in r[i]:
        s = str(a)
        d = a%10
        for j in range(d-1,d+2):
            if not 0 <= j <= 9: continue
            r[i+1].append(int(s+str(j)))

for i in range(10):
    if K >= len(r[i]):
        K -= len(r[i])
    else:
        print(r[i][K-1])
        break
# Judge status: Accepted
N = int(input())
l = []

for i in range(N):
    l.append(''.join(sorted(input())))

l.sort()
count = ans = 0

for i in range(N-1):
    if (l[i] == l[i+1]):
        count += 1
        ans += count
    else:
        count = 0

print(ans)
# Judge status: Wrong Answer
s=input()
a="keyence"
b=0
flug=0

for i in s:
    if i==a[b]:
        b+=1
        if flug==1:
            flug=2
    else:
        if flug==0:
            flug=1
        elif flug==2:
            print("NO")
            exit()
    
    if b==7:
        print("YES")
        exit()

print("NO")
# Judge status: Accepted
S=input()
if '9' in S:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n = int(input())
dicti = {}
boss = list(map(int, input().split()))
for i in boss:
    if i in dicti:
        dicti[i] += 1
    else:
        dicti[i] = 1
#print(dicti)
for j in range(1,n+1):
    try:
        print(dicti[j])
    except:
        print(0)
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
i=0
a=1
t=0
while i<N-1:
    if A[i]<A[i+1]:
        if t==-1:
            a+=1
            t=0
        elif not t:
            t=1
    elif A[i]>A[i+1]:
        if t==1:
            a+=1
            t=0
        elif not t:
            t=-1
    i+=1
print(a)
# Judge status: Wrong Answer
a = int(input())
b = int(input())
c = int(input())
x = int(input())

cnt = 0
for i in range(a):
    for j in range(b):
        for k in range(c):
            ans = i*500 + j*100 + k*50
            if ans == x:
                cnt += 1

print(cnt)
# Judge status: Wrong Answer
x,y,z = map(int, input().split())

n = x//(y+z)

if x - (y+z)*n >= y:
  print(n+1)
else:
  print(n)
# Judge status: Accepted
X = int(input())

while True:
    for x in range(2,X):
        if X%x == 0:
            X +=1
            break
    else:
        print(X)
        break
# Judge status: Accepted
n,k=map(int,input().split())
lst_1=list(map(int,input().split()))
# print(lst_1)
for i in range(n-k):
    if(lst_1[i+k]>lst_1[i]):
        print("Yes")
    else:print("No")
# Judge status: Wrong Answer
N = int(input())
L0 = 2
L1 = 1
if N == 1:
  print(L1)
for i in range(2, N + 1):
  L0, L1 = L1, L0 + L1
print(L1)
# Judge status: Wrong Answer
input()
H = [int(i) for i in input().rstrip().split(' ')]
N = len(H)

for i in range(0,N):
    a = H[i]
    b = H[i - 1] if i > 0 else 0
    n = H[i + 1] if i < N -1 else 10**9
    print(i,"#",b,a,n)
    if n == a - 1:
        if b == a:
            print("No")
            break
        else:
            H[i] -= 1
    elif n < a - 1:
            print("No")
            break
else:
    print("Yes")
print(H)
# Judge status: Accepted
import numpy as np
N=int(input())
print(2**int(np.log2(N)))
# Judge status: Accepted
import queue
N = int(input())
U = input().split()
l = [0 for i in range(N)]
for i in range(N):
    l[i]= int(U[i])

l.sort()
l.reverse()
ans = 0
if N%2 == 0:
    for i in range(N//2):
        ans += 2*l[i]
    ans -= l[0]
else:
    for i in range(1,(N+1)//2-1):
        ans += 2*l[i]
    ans += l[0]+l[(N+1)//2-1]

print(ans)
# Judge status: Accepted
a,b,c = map(int,input().split())
print("YES" if a*b*c ==175 else "NO")
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
min_num=min(a)
for i in a:
    if i==min_num:
        continue
    else:
        if i%min_num!=0:
            print(1)
            exit()
print(min_num)
# Judge status: Accepted
a, b = map(int, input().split())
if a > b:
    for i in range(0,a):
        print(b,end="")
else:
    for i in range(0,b):
        print(a,end="")
# Judge status: Accepted
N = int(input())

for i in range(100):
    for j in range(100):
        if i*4+j*7 == N:
            print("Yes")
            exit()

print("No")
# Judge status: Accepted
Weather = ['Sunny','Cloudy','Rainy']
print(Weather[(Weather.index(input()) + 1) % 3])
# Judge status: Wrong Answer
S = input()
if S == 'AAA' or S == 'BBB':
    print('NO')
else:
    print('Yes')
# Judge status: Accepted
X,Y = map(int,input().split())
print(X+(Y//2))
# Judge status: Accepted
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10**9)
mod = 10**9+7

A = l()
A.sort()
if A == [5,5,7]:
    print('YES')
else:
    print('NO')
# Judge status: Wrong Answer
S = input()

if 'A' and 'B' in S:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(int, input().split()))

dic = {}
list_town = []
set_town = set()
town = 1

for i, v in enumerate(A):
    dic[i+1] = v

for _ in range(K):
    list_town.append(town)
    set_town.add(town)
    town = dic[town]
    if town in set_town:
        stop_town = town
        break

if N <= K:
    list_first_split = list_town[:list_town.index(stop_town)]
    list_second_split = list_town[list_town.index(stop_town):]
    print(list_second_split[(K - (len(list_first_split))) % len(list_second_split)])
else:
    print(town)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = 0
for i in range(n):
  f = min(a[i],b[i])
  ans += f
  a[i] -= f
  g = min(a[i+1],b[i]-f)
  ans += g
  a[i+1] -= g
print(ans)
# Judge status: Accepted
def median(array):
    tmp = sorted(array)
    if len(array) % 2:
        return tmp[len(array)//2]
    else:
        return (tmp[len(array)//2] + tmp[len(array)//2 - 1]) / 2


[n], *x = [[*map(int, t.split())] for t in open(0)]
a, b = zip(*x)
if n % 2 == 0:
    print(int(2*(median(b) - median(a)) + 1))
else:
    print(median(b) - median(a) + 1)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
cnt = [1 for x in a if x < 0]
ans = 0
mini = float("inf")
for i in a:
    if i < 0:
        i *= -1
    mini = min(mini, i)
    ans += i
if sum(cnt) % 2 == 0:
    print(ans)
else:
    print(ans - mini * 2)
# Judge status: Wrong Answer
a, b = list(map(int, input().strip().split())) # 2整数を受け取った
s1 = a * (a - 1) /2 #偶どうし
s2 = b * (b - 1) /2 #奇どうし
# 出力
print(s1 + s2)
# Judge status: Accepted
L, R, d = map(int, input().split())

out = 0
for i in range(L, R + 1):
    out += 1 if i % d == 0 else 0

print(out)
# Judge status: Accepted
n = int(input())
m = [0]*100

for i in range(1,n+1):
    if str(i)[-1] != "0":
        m[((int(str(i)[0])) * 10)+(int(str(i)[-1]))] += 1

res = sum([m[i]*m[int(str(i)[::-1])] for i in range(100)])

print(res)
# Judge status: Wrong Answer
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
l3=list(map(int,input().split()))
l=[l1,l2,l3]
c=l[0][0]
for i in range(3):
    for j in range(3):
        l[i][j] -=c
print(l)
if (l[1][1]==l[0][1]+l[1][0]) and (l[2][1]==l[0][1]+l[2][0]) and (l[1][2]==l[0][2]+l[1][0])and (l[2][2]==l[2][0]+l[0][2]):
    print('Yes')
else:
    print("No")
# Judge status: Accepted
from math import degrees, atan

a, b, x = map(int, input().split())
if 2 * x > a * a * b:
    ans = degrees(atan(2 * ((b / a) - (x / (a ** 3)))))
else:
    ans = degrees(atan(a * b * b / (2 * x)))
print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
  a[i] -= i+1

b = round(sum(a)/n, 0)
ans = 0
for i in range(n):
  ans += abs(a[i]-b)

print(ans)
# Judge status: Accepted
n, K = map(int, input().split())

p = 1/n

ans = 0
for result in range(1, n+1):
    # result = 1,2,3
    k = K
    k /= result
    cnt = 0
    while k > 1:
        k /= 2
        cnt += 1
    ans += p * (0.5)**cnt
print(ans)
# Judge status: Accepted
X,K,D = map(int,input().split())
if X < 0:
  X = -X
A = X // D
if A > K:
  print(X - (K*D))
else:
  B = X % D
  KK = K - A
  if KK % 2 == 1:
    print(abs(B-D))
  elif KK % 2 == 0:
    print(abs(B))
# Judge status: Accepted
N = input()
L = []
A = []

for i in range (len(N)-2):
  L.append(N[i]+N[i+1]+N[i+2])
  
for j in range(len(L)):
  A.append(abs(int(L[j])-753))
  
print(min(A))
# Judge status: Wrong Answer
n = int(input())
A = list(map(int, input().split()))
A = sorted(A)
from bisect import bisect_left
ans = 0
for i in range(1, A[-1]):
  cnt = bisect_left(A, i+2) - bisect_left(A, i-1)
  ans = max(ans, cnt)
  #print(i, cnt)
print(ans)
# Judge status: Wrong Answer
import bisect
import math
n = int(input())
l = sorted(list(map(int,input().split())))
if len(l)==2 :
  print(l[-1],l[-2])
  exit()
  
a = l[-1]/2
s = bisect.bisect_left(l,a)
if l[s]==a:
  print(l[-1],l[s])
  exit()
k1 = l[s-1]
k2 = l[s]
s1 = a-k1
if k2==l[-1]:
  k2 = k1
s2 = a-k2
if s1<=s2:
  print(l[-1],k1)
else:
  print(l[-1],k2)
# Judge status: Accepted
S=str(input())
K=int(input())

first_number=1
location=0
for i in range(len(S)):
  if int(S[i]) != 1:
    first_number = S[i]
    location = i
    break
if K <= location:
  print(1)
else:
  print(first_number)
# Judge status: Accepted
def cnt(A, B, X):
    A1 = -(-A // X)
    B1 = B // X
    return B1 - A1 + 1

def gcd(A, B):
    mul = A * B
    if A < B:
        A, B = B, A
    while B:
        A, B = B, A % B
    return mul // A 

A, B, C, D = map(int,input().split())
print((B - A + 1) - cnt(A, B, C) - cnt(A, B, D) + cnt(A, B, gcd(C, D)))
# Judge status: Accepted
n=int(input())
a=list(map(int, input().split()))
cnt_2=0
cnt_1=0
cnt_0=0

for num in a:
    if num%4==0:
        cnt_2+=1
    elif num%2==0:
        cnt_1+=1
    else:
        cnt_0+=1

if cnt_1==0:
    if cnt_2+1>=cnt_0:
        print("Yes")
    else:
        print("No")

else:
    if cnt_2>=cnt_0:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
s = str(input())
n = len(s)
t = s[::-1]
ans = 0
for i in range(n//2):
    if s[i] != t[i]: ans += 1
print(ans)
# Judge status: Wrong Answer
d,t,s = map(int,input().split())

if d // s <= t:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
s = input()
t = input()
print("YNeos"[s not in t*3::2])
# Judge status: Accepted
s = int(input())

ans = 0

while s not in [1,2,4]:
    ans+=1
    if s%2:
        s = 3*s+1
    else:
        s//=2

print(ans+4)
# Judge status: Accepted
import heapq
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
l = []
for i in set(a):
    if c[i] >= 2:
        for j in range(c[i]//2):
            l.append(i)
if len(l) >= 2:
    print(heapq.nlargest(2, l)[0]*heapq.nlargest(2, l)[1])
else:
    print(0)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
if a[0]:exit(print(-1))
b=[1]
for i in range(1,n+1):
  b.append(b[-1]*2-a[i])
if min(b)<0:exit(print(-1))
b[-1]=a[-1]
for i in range(n,0,-1):
  b[i-1]=min(b[i-1],b[i])
  b[i-1]+=a[i-1]
print(sum(b))
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt1=[0]*n
cnt2=[0]*n
for i in range(n):
    if a[i]>b[i]:
        cnt2[i]=a[i]-b[i]
    else:
        num4=b[i]-a[i]
        cnt1[i]=num4//2
        cnt2[i]=num4%2
num5=abs(sum(a)-sum(b))
if max(sum(cnt1),sum(cnt2))+abs(sum(cnt1)-sum(cnt2))<=num5:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
import sys
import itertools
array = [ int(input()) for I in range(5) ]
for I in array:
    if not ( 1 <= I <= 123 ):
        sys.exit()

min = (123 * 5) + (10 * 5)
for J in list(itertools.permutations(array)):
    time = 0
    for K in J[0:-1]:
        time += round(K,-1)
    time += J[-1]
    if min > time: min = time
print(min)
# Judge status: Wrong Answer
a, b, c, d =map(int, input().split())

if 0 < b and 0 < d:
    print(b*d)
elif 0 > b and 0 < d:
    print(b*c)
elif 0 < b and 0 > d:
    print(a*d)
else:
    print(a*c)
# Judge status: Accepted
c = [list(map(int, input().split())) for _ in range(3)]
a1 = 0
b1 = c[0][0] - a1
a2 = c[1][0] - b1
b2 = c[0][1] - a1
a3 = c[2][0] - b1
b3 = c[0][2] - a1
if a2 + b2 != c[1][1]:
    print("No")
    exit()
if a2 + b3 != c[1][2]:
    print("No")
    exit()
if a3 + b2 != c[2][1]:
    print("No")
    exit()
if a3 + b3 != c[2][2]:
    print("No")
    exit()
print("Yes")
# Judge status: Accepted
a, b = map(int, input().split())
print(max(a, b) + max(max(a, b) - 1, min(a, b)))
# Judge status: Accepted
n = int(input())
ans = 0
while ans<n:
    ans += 111
print(ans)
# Judge status: Accepted
n, a, b = map(int, input().split())
div, rest =divmod(n, (a + b))
#div, rest
ans = a * div
if rest >= a:
    ans += a
else:
    ans += rest
print(ans)
# Judge status: Wrong Answer
# coding: utf-8
# Your code here!
A,B,N=map(int,input().split())

num=N//B
if num==0:
    n=N
else:
    n=B*num-1

temp1=(A*n)/B//1
temp2=A*((n/B)//1)

print(temp1-temp2)
# Judge status: Accepted
s = input()
print('Bad' if s[0] == s[1] or s[1] == s[2] or s[2] == s[3] else 'Good')
# Judge status: Accepted
import math
n = int(input())

a = math.floor(n / 1.08)
b = a + 1

aa = math.floor(a * 1.08)
bb = math.floor(b * 1.08)
if (aa == n):
    print(a)
else:
    if (bb == n):
        print(b)
    else:
        print(':(')
# Judge status: Accepted
a, b, c = map(int, input().split())
k = int(input())
cnt = 0
while b <= a:
    b *= 2
    cnt += 1
while c <= b:
    c *= 2
    cnt += 1
if cnt <= k:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
A, B = map(int, input().split())

if A <= 8 and B <= 8:
  print("Yay!")
else:
  print(":(")
# Judge status: Accepted
n=int(input())
l=[0,0,0,0]
for _ in range(n):
	s=input()
	if(s=='AC'):
		l[0]+=1
	elif(s=='WA'):
		l[1]+=1
	elif(s=='TLE'):
		l[2]+=1
	elif(s=='RE'):
		l[3]+=1
print("AC x",l[0])
print("WA x",l[1])
print("TLE x",l[2])
print("RE x",l[3])
# Judge status: Wrong Answer
n = int(input())
p = list(map(int, input().split()))
ans = 0
min_p = n

for i in p:
    if i < min_p:
        min_p = i
        ans += 1

print(ans)
# Judge status: Wrong Answer
N = int(input())
L = list(map(int, input().split()))
lmax = max(L)
suml = 0
for i in L:
    if i != lmax:
        suml += i

if lmax < suml:
    print('Yes')
    exit()
print('No')
# Judge status: Accepted
line = list(map(int,input().split()))
if line[0] >= 10:
  print(line[1])
else:
  print(line[1] + (100 * (10 - line[0])))
# Judge status: Accepted
N = int(input())
mylist=[]

for i in range(N+1):
    if i==0:
        mylist.append(2)
    elif i==1:
        mylist.append(1)
    else:
        a=0
        a=mylist[-1]+mylist[-2]
        mylist.append(a)
print(mylist[-1])
# Judge status: Wrong Answer
GI = lambda: int(input()); GIS = lambda: map(int, input().split()); LGIS = lambda: list(GIS())

def main():
    GI()
    CEIL = 10 ** 18

    prod = 1
    for x in GIS():
        prod *= x
        if prod > CEIL:
            prod = -1
            break
    print(prod)

main()
# Judge status: Accepted
M = 10**9 + 7
x,y = map(int, input().split())

def solve():
    at = 2*x - y
    bt = 2*y - x
    if at < 0 or bt < 0 or at % 3 != 0 or bt %3 != 0:
        return 0
    a = at // 3
    b = bt // 3
    num = den = 1
    for i in range(max(a, b)+1, (a+b)+1):
        num = num * i % M
    for i in range(2, min(a, b)+1):
        den = den * i % M
    inv_den = pow(den, M-2, M)
    return num * inv_den % M

print(solve())
# Judge status: Wrong Answer
import bisect
N = int(input())
l = [int(i) for i in input().split()]
count = 0
l_new = sorted(l)
for i in range(N-2):
    for j in range(i+1,N-1):
        left = bisect.bisect_right(l_new,abs(l_new[i]-l_new[j]))
        right = bisect.bisect_left(l_new,l_new[i] + l_new[j])
        count += right - left
        
        
print(count//3)
# Judge status: Accepted
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N = I()
a = LI()
ans = 0
num_count = [0]*(10**5+2)
for x in a:
    num_count[x-1] += 1
    num_count[x] += 1
    num_count[x+1] += 1
print(max(num_count))
# Judge status: Accepted
n = int(input())
slist = list(map(int, input().split()))

#print(slist)
score=0
while len(slist)>=2:
	m1 = min(slist)
	slist.remove(m1)
	m2 = min(slist)
	slist.remove(m2)
#	print(m1,m2)
	slist.append((m1+m2)/2)
#	print((m1+m2)/2)
#	print(slist)
print(slist[0])
# Judge status: Wrong Answer
n=int(input())
arr=[0]*n
for i in range(n):
    arr[i]=int(input())

arr=sorted(arr)
num=arr[0]
tmp=1
ans=0
for i in range(1,n):
    if arr[i]==num:
        tmp+=1
    else:
        if tmp%2==1:
            ans+=1
        num=arr[i]
        tmp=1
print(ans)
# Judge status: Accepted
import sys
input = sys.stdin.readline
 
S = input().rstrip('\n')
T = input().rstrip('\n')

result = 'No'

for i in range(len(S)):
  if S[-i:]+S[:-i] == T:
    result ='Yes'

      
print(result)
# Judge status: Accepted
d, n = map(int,input().split())

def cal(x):
  if x % 100 != 0: return 0
  return cal(x/100) + 1

cnt = 0
tmp = 1
while True:
  if cal(tmp) == d:
    cnt += 1
  if cnt == n:
    break
  tmp += 1
print(tmp)
# Judge status: Accepted
n, m = map(int, input().split())
if n >= m:
    print(0)
    exit()

lx = sorted(list(map(int, input().split())))

ld = sorted([lx[i+1]-lx[i] for i in range(m-1)])
if n == 1:
    print(sum(ld))
else:
    print(sum(ld[:-(n-1)]))
# Judge status: Accepted
s = input()

master = "keyence"

i = 0
f = 0

if(s[0:7] == master or s[-7:] == s):
    print("YES")
else:
    i = 0
    while (s[i] == master[i]):
        i += 1
    if (s[-7+i:] == master[i:]):
        print("YES")
    else:
        print("NO")
# Judge status: Accepted
x = int(input())
for i in range(0,100000):
    ix = i*(i+1)/2
    if x <= ix :
        print(i)
        exit()
    else:
        pass
# Judge status: Accepted
a, b, c, x, y = map(int, input().split())
ans = a * x + b * y
ans = min(c * max(x, y) * 2, ans)
if x < y:
    ans = min(c * x * 2 + (y - x) * b, ans)
else:
    ans = min(c * y * 2 + (x - y) * a, ans)

print(ans)
# Judge status: Accepted
D = int(input())
ans = "Christmas" + " Eve" * (25-D)
print(ans)
# Judge status: Wrong Answer
K=int(input())
if K%2==0:
  n=K//2
  n=n*(n-1)
  n+=(K-n)*(K-n-1)
  print(n)
else:
  n=(K+1)//2
  n=n*(n-1)
  n+=(K-n)*(K-n-1)
  print(n)
# Judge status: Wrong Answer
import sys

def solve():
    input = sys.stdin.readline
    X = int(input())
    if X % 11 <= 6: print(((X - 1) // 11 + 1) * 2 - 1)
    else: print(((X - 1) // 11 + 1) * 2)

    return 0

if __name__ == "__main__":
    solve()
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
if a <= b <= c or a >= b >= c:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
a, b = map(int, input().split())
# intは入力に対しての関数、出力ではない

if (a+b)%3 == 0:
    print("Possible")
if a%3 == 0:
    print("Possible")
if b%3 == 0:
    print("Possible")
else:
    print("Impossible")
# Judge status: Wrong Answer
N, A, B, C, D = map(int, input().split())
s = input()

if C > D:
    if "##" in s:
        print("No")
    else:
        if "..." in s[B-2:D+1]:
            print("Yes")
        else:
            print("No")
else:
    if "##" in s:
        print("No")
    else:
        print("Yes")
# Judge status: Accepted
N, A, B = map(int, input().split())
MOD = 10 ** 9 + 7

def calc_inv(n, k, mod):
    a = 1
    b = 1
    for i in range(1,k+1):
        a *= i
        a %= mod
        b *= n
        n -= 1
        b %= mod
    return b * pow(a, mod-2, mod) % mod

ret = pow(2, N, MOD) - 1 - calc_inv(N,A,MOD) - calc_inv(N,B,MOD)
ret %= MOD
if ret < 0:
    ret += MOD
print(int(ret))
# Judge status: Accepted
a, b, x = map(int, input().split())

bans = b//x
aans = a//x

if a%x == 0:
    aans -= 1

print(bans - aans)
# Judge status: Accepted
lis= list(map(int,input().split()))
k = int(input())

mt = max(lis)

a = sum(lis)-mt

for i in range(k):
    mt *= 2
    
print(a + mt)
# Judge status: Accepted
k,n=map(int,input().split())
a=list(map(int,input().split()))

s = 0
for i in range(n):
    if i == n-1:
        s = max(s,a[0] + k - a[i])
    else:
        s = max(s,a[i+1] - a[i])
print(k-s)
# Judge status: Accepted

N = int(input())
L, H = [0] * N, [0] * N

for i in range(N):
    L[i], H[i] = list(map(int, input().split()))

L.sort()
H.sort(reverse=True)
if N%2 == 1:
    i = (N-1)//2
    l, h = L[i], H[i]
    print(h-l+1)
else:
    i = N//2
    ll, lh = L[i-1], L[i]
    hl, hh = H[i-1], H[i]
    print((hh+hl) - (lh+ll) + 1)
# Judge status: Wrong Answer
import math

n = int(input())
count = 0

if n == 1:
    print(0)
    exit()

for i in range(2, int(math.sqrt(n)) + 1):
    if n % i == 0:
        count += 1
        n = n // i
print(count)