Harryxun/stf_run huggingface dataset:
"""
TODO
"""
import sys


def substring(s):
    ss = []
    max_ss = len(s) + 1
    for ss_len in range(1, max_ss):
        max_ofs = max_ss - ss_len
        for ofs in range(0, max_ofs):
            c = s[ofs:ss_len + ofs]
            ss.append(c)
    ss = list(set(ss))
    return sorted(ss)


def nth_largest(s, n):
    ss = substring(s)
    return ss[n - 1]


if __name__ == "__main__":
    s = input().rstrip()
    K = int(input().rstrip())
    print(nth_largest(s, K))


### FIXED CODE ###

"""
TODO
"""


def talkable(a, b, c, d):
    if abs(a - c) <= d:
        return True

    if abs(a - b) <= d:
        if abs(b - c) <= d:
            return True

    return False


if __name__ == "__main__":
    a, b, c, d = map(int, input().rstrip().split(' '))
    if talkable(a, b, c, d):
        print('Yes')
    else:
        print('No')
N = int(input())
str_lis = []
for i in range(N):
  str_lis.append(ord(input()))

max_num = 0
max_str = []
for i in str_lis:
  if str_lis.count(i) > max_num and not i in max_str:
    max_num = str_lis.count(i)
    max_str = []
    max_str.append(i)
  elif str_lis.count(i) == max_num and not i in max_str:
    max_num = str_lis.count(i)
    max_str.append(i)
    
new_max_str = sorted(max_str)

for i in new_max_str:
  print(chr(i))

### FIXED CODE ###

from collections import Counter

N = int(input())

str_lis = [str(input()) for i in range(N)]
c = Counter(str_lis)
a = c.most_common()
num = a[0][1]
b = []
for i in a:
  if i[1] == num:
    b.append(i[0])
    num = i[1]
  else:
    break
    
new_b = sorted(b)
for i in new_b:
  print(i)
import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(500*500)
import itertools
from collections import Counter,deque

def main():
    n,k = map(int, input().split())
    a = list(map(int, input().split()))

    c = []
    mark = [-1]*n
    pos,l = 0,0
    while 1:
        if mark[pos] >= 0:
            l = mark[pos]
            break
        mark[pos] = len(c)
        c.append(pos)
        pos = a[pos] - 1
    if k <= l:
        print(c[k] + 1)
    else:
        k -= l
        print(c[l + k%(len(c) - 1)] + 1)
if __name__=="__main__":
    main()


### FIXED CODE ###

import math
from math import gcd
INF = float("inf")

import sys
input=sys.stdin.readline
sys.setrecursionlimit(500*500)
import itertools
from collections import Counter,deque

def main():
    n,k = map(int, input().split())
    a = list(map(int, input().split()))

    c = []
    mark = [-1]*n
    pos,l = 0,0
    while 1:
        if mark[pos] >= 0:
            l = mark[pos]
            break
        mark[pos] = len(c)
        c.append(pos)
        pos = a[pos] - 1
    if k <= l:
        print(c[k] + 1)
    else:
        k -= l
        print(c[l + k%(len(c) - l)] + 1)
if __name__=="__main__":
    main()
import collections
from itertools import combinations
import math
from functools import reduce
N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def gcd(*numbers):
    return reduce(math.gcd, numbers)

L = collections.Counter(prime_factorize(N-1))
# print(L)
A = 1
for i,v in L.items():
    A *= (v+1)
# 1を抜く
A -= 1 

c = collections.Counter(prime_factorize(N))
prime = list(dict(c).keys())
d = []
for i in range(1,len(c)):
    d += list(combinations(prime,i))
be = list(c.values())


D = 0
if len(be) > 1:
    # print(be)
    beki = gcd(be)
else:
    beki = be[0]
    while beki%2 == 0:
        beki = beki //2
        D += 1

# C = 1
# for i,v in L.items():
#     C *= (v+1)
# C -= 1

B = 1
# print(c)
for divisor in d:
    a = N
    b = 1
    # print(divisor)
    for i in divisor:
        a /= (i ** c[i])
        b = i
    # print(a,b)
    for j in range(c[i]):
        b = b**(j+1)
        if a > b:
            amari = a%b
            # print(b,a,amari)
            if amari == 1:
                B += 1

# print(A,B,D)
print(A+B+D)

### FIXED CODE ###

import math
N = int(input())
M = int(math.sqrt(N))
M2 = int(math.sqrt(N-1))
y = []
for i in range(1,M2+1):
    if (N-1)%i == 0:
        m = (N-1)//i
        if not m == 1:
            y.append(m)
        if i == 1 or i == m:
            continue
        else:
            y.append(i)
count = len(y)

y = []
for i in range(1,M+1):
    if N%i == 0:
        m = N//i
        y.append(m)
        if i == 1 or i == m:
            continue
        else:
            y.append(i)

for i in y:
    NN = N
    while NN%i == 0:
        NN /= i
    # print(NN)
    if int(NN) % i == 1:
        count += 1
        # print(i)

print(count)
n=int(input())
wordlist=[input() for i in range(n)]
sortlist=[]
for i in range(n):
    a=list(wordlist[i])
    a.sort()
    a="".join(a)
    sortlist.append(a)
    
def kaijyo(n):
    ans=1
    for i in range(2,n+1):
        ans*=i
    return ans

count=0
sortlist.sort()


while sortlist:
    a=sortlist.pop()
    times=sortlist.count(a)+1
    for i in range(times-1):
        sortlist.pop()
    count+=kaijyo(times)*kaijyo(times-2)/2
    
print(int(count/2) )   

### FIXED CODE ###

a,b=[int(i) for i in input().split()]
print(max(a+b,a-b,a*b))
N = int(input())
if N == 1:
    print("Hello World")
else :
    A , B = int(input())
    print(A+B)

### FIXED CODE ###

N = int(input())
if N == 1:
    print("Hello World")
else :
    A  = int(input())
    B = int(input())
    print(A+B)
def zen(t):
    aa=0
    for i in range(len(t)-1):
        if t[i]==t[i+1]:
            aa+=1
        if len(t)-1==aa:
            return True
        else:
            return False

s=input()
k=int(input())
cnt=[]
ans=0
c=1
if zen(s):
    print(len(s)*k//2)
else:
    for i in range(len(s)-1):
        if s[i]==s[i+1]:
            c+=1
        else:
            cnt.append(c)
            c=1
        if i==len(s)-2:
            cnt.append(c)
    ans=0
    if s[0]==s[-1]:
        for i in range(len(cnt)):
            ans+=cnt[i]//2
        print(ans*k+(k-1)-(cnt[0]//2 + cnt[-1]//2 - (cnt[0]+cnt[-1])//2))
    else:
        for i in range(len(cnt)):
            ans+=cnt[i]//2
        print(ans*k)

### FIXED CODE ###

def is_all(t):
    for i in range(len(t)-1):
        if t[i]!=t[i+1]:
            return False
    return True

s=input()
n=len(s)
k=int(input())
cor=[1]
ans=0
c=1
if is_all(s):
    print(n*k//2)
    exit()
i=0
while i<n-1:
    if s[i]==s[i+1]:
        cor[0]+=1
        i+=1
    else:
        i+=1
        break
while i<n-1:
    if s[i]==s[i+1]:
        cor.append(1)
        while i<n-1:
            if s[i]==s[i+1]:
                cor[-1]+=1
                i+=1
            else:
                break
    i+=1
#print(cor)
if s[0]==s[-1]:
    for i in range(1,len(cor)-1):
        ans+=cor[i]//2
    ans*=k
    ans+=(cor[0]+cor[-1])//2*(k-1)
    print(ans+cor[0]//2+cor[-1]//2)
else:
    for i in range(len(cor)):
        ans+=cor[i]//2
    print(ans*k)
import math

list_8 = []
list_10 = []

for i in range(101):
  list_8.append( math.ceil((i+1) * 12.5) )
  list_10.append( (i+1) * 10 )
  
A, B = map(int, input().split())

A_ = list_8[A]
if B < 100:
  
B_ = list_10[B]
B = list_10[B-1]

if A_ < B or B_ < A:
  print(-1)
elif B <= A_:
  print(B)
else:
  print(A)

### FIXED CODE ###

import math

list_8 = []
list_10 = []

for i in range(101):
  list_8.append( math.ceil((i+1) * 12.5) )
  list_10.append( (i+1) * 10 )
  
A, B = map(int, input().split())

A_ = list_8[A] - 1
A = list_8[A-1]
  
B_ = list_10[B] - 1
B = list_10[B-1]

if A <= B <= A_:
  print(B)
elif B <= A <= B_:
  print(A)
else:
  print(-1)
import math
r = int(input())
ret = r * r * math.pi
print('{0:.6f} {1:.6f}'.format(ret, ret))

### FIXED CODE ###

import math
r = float(input())
print('{0:.6f} {1:.6f}'.format(r * r * math.pi, (r + r) * math.pi))
N=int(input())
A=list(map(int,input().split()))
B=[0]*100000
total=0
mini=1000000000000000000
for i in range(N):
    total+=A[i]
    B[i]=total

for i in range(N):
    if abs(B[i]-(B[N-1]-B[i]))<mini:
        mini=abs(B[i] - (B[N - 1] - B[i]))
print(mini)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
B=[0]*200000
total=0
mini=1000000000000000000
for i in range(N):
    total+=A[i]
    B[i]=total

for i in range(N-1):
    if abs(B[i]-(B[N-1]-B[i]))<mini:
        mini=abs(B[i] - (B[N - 1] - B[i]))
print(mini)
n = input
for i in range(len(n)):
  if n[i] == '1':
    n[i] = '9'
   elif n[i] == '9':
    n[i] = '1'
print(n)

### FIXED CODE ###

n = list(input())
for i in range(len(n)):
  if n[i] == '1':
    n[i] = '9'
  elif n[i] == '9':
    n[i] = '1'
print("".join(n))
A, B, K = map(int, input().split())

ans = [i for i in range(1, A+1) if A % i == 0 and B % i == 0]
print(ans[1])


### FIXED CODE ###

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

ans = [i for i in range(1, min(A, B) + 1) if A % i == 0 and B % i == 0]
print(ans[-K])
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in n:
    ans += 1 / i
print(1 / ans)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
    ans += 1 / a[i]
print(1 / ans)
a=input()
if len(a)%2==0:
    for i in range(len(a)-3):
        b="{}".format(a[i]+a[i+1]+a[i+2]+a[i+3])
        c=list(set(a[i:i+4]))
        if (len(c)==2)&(b!="{}".format(c[0]+c[0]+c[1]+c[1]))&(b!="{}".format(c[1]+c[1]+c[0]+c[0])):
            print("{}".format(i+1)+" "+"{}".format(i+4))
            break
    else:
        print("-1 -1")
else:
    for j in range(len(a)-2):
        d="{}".format(a[j]+a[j+1]+a[j+2])
        e=list(set(a[i:i+3]))
        if len(e)==2 or len(e)==1:
            print("{}".format(i+1)+" "+"{}".format(i+3))
            break
    else:
        print("-1 -1")

### FIXED CODE ###

a=input()
if len(a)==1:
    print("-1 -1")
elif (len(a)==2)&(len(list(set(a)))==1):
    print("1 2")
else:
    for i in range(len(a)-2):
        e=list(set(a[i:i+3]))
        if (len(e)==2) or (len(e)==1):
            print("{}".format(i+1)+" "+"{}".format(i+3))
            break
    else:
        print("-1 -1")
import math
if K <= A:
  print(K)
if A < K <= A + B:
  print(A)
if A + B < K <= A + B + C:
  print(A * 2 + B - K)

### FIXED CODE ###

import math
A, B, C, K = list(map(int, input().split()))
if K <= A:
  print(K)
if A < K <= A + B:
  print(A)
if A + B < K <= A + B + C:
  print(A * 2 + B - K)
s,t = input().split()
a,b = map(int,input().split())
u = input()

if u == s:
    print(a,b-1)
else u == t:
    print(a-1,b)

### FIXED CODE ###

s,t = input().split()
a,b = map(int,input().split())
u = input()

if u == t:
    print(a,b-1)
else:
    print(a-1,b)
b = input()
if b = "A":
  print("T")
elif b = "T":
  print("A")
elif b = "C":
  print("D")
else b = "D":
  print("C")

### FIXED CODE ###

b = input()
if b == "A":
  print("T")
elif b == "T":
  print("A")
elif b == "C":
  print("G")
else:
  print("C")
H,W = map(int,input().split())
lists = [input() for i in range(H)]
x = 1
y = 1
check = True
while(x<W-1 and y<H-1):
    if(lists[x][y] == "#"):
        if(x!=0 or y!=0 or x==W-1or y==H-1):
            if((lists[x+1][y] == ".") and (lists[x-1][y] == ".") and (lists[x][y-1] == ".") and (lists[x][y+1] == ".")):
                check = False
    x = x+1
    if(x <=W-1):
        x = 1
        y = y+1
if(lists[0][0] == "#"):
     if(lists[0][1] == "." and lists[1][0] == "."):
        check = False
if(lists[H-1][0] == "#"):
     if(lists[H-2][0] == "." and lists[H-1][1] == "."):
            check = False
if(lists[0][W-1] == "#"):
    if(lists[0][W-2] == "." and lists[1][W-1] == "."):
        check = False
if(lists[H-1][W-1] == "#"):
    if(lists[H-2][W-1] == "." and lists[H-1][W-2] == "."):
        check = False
if(check):
    print("Yes")
else :
    print("No")

### FIXED CODE ###

H,W = map(int,input().split())
lists = [input() for i in range(H)]
x = 1
y = 1
check = True
for x in range(1,H-1):
    for y in range(1,W-1):
        if(lists[x][y] == "#"):
            if(x!=0 or y!=0 or x==W-1or y==H-1):
                if((lists[x+1][y] == ".") and (lists[x-1][y] == ".") and (lists[x][y-1] == ".") and (lists[x][y+1] == ".")):
                    check = False
if(lists[0][0] == "#"):
     if(lists[0][1] == "." and lists[1][0] == "."):
        check = False
if(lists[H-1][0] == "#"):
     if(lists[H-2][0] == "." and lists[H-1][1] == "."):
            check = False
if(lists[0][W-1] == "#"):
    if(lists[0][W-2] == "." and lists[1][W-1] == "."):
        check = False
if(lists[H-1][W-1] == "#"):
    if(lists[H-2][W-1] == "." and lists[H-1][W-2] == "."):
        check = False
if(check):
    print("Yes")
else :
    print("No")
n=int(input())
h=list(map(int,input().split()))
h_=list()
cnt=0
for i in range(n-1):
  if h[i]>h[i+1]:
    h_.append(h[i]-1)
  else:
    h_.append(h[i])
for i in range(n-1):
  if l[i]>l[i+1]:
    cnt=1
if cnt=0:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
for i in range(1,n):
  if h[-i]+1==h[-i-1]:
    h[-i-1]-=1
  elif h[-i]+1<h[-i-1]:
    print('No')
    exit()
print('Yes')
# -*- coding: utf-8 -*-

M, D = map(int, input().split())
count = 0

for i in range(1, M+1):
    for j in range(1, D+1):
        d_1 = int(str(j).zfill(len(str(M)))[-1])
        d_10 = int(str(j).zfill(len(str(M)))[-2])
        if d_10 > 1 and d_1 >1 and d_10 * d_1 == i:
            count += 1

print(count)

### FIXED CODE ###

# -*- coding: utf-8 -*-

M, D = map(int, input().split())
count = 0

for i in range(1, M+1):
    di = len(str(i))
    for j in range(1, D+1):
        d_10 = j // 10
        d_1 = j % 10
        if d_10 >= 2 and d_1 >= 2 and d_10 * d_1 == i:
            count += 1

print(count)
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
list1 = [a,b,c,d,e]
list2 = ["a","b","c","d","e"]
list3 = {}
 
for i,j in zip(list1,list2):
  i = i - 1
  sum = 1
  if i % 10 == 0:
    i = sum
  else:
    pass
  sum += 1
  list3[j] = sum
list3.sort()
list3.values()
    
  
def pri(kan):
  if kan <= 10:
    return 10
  if kan > 10 and kan <=20:
    return 20
  if kan > 20 and kan <=30:
    return 30
  if kan > 30 and kan <=40:
    return 40
  if kan > 40 and kan <=50:
    return 50
  if kan > 50 and kan <=60:
    return 60
  if kan > 60 and kan <=70:
    return 70
  if kan > 70 and kan <=80:
    return 80
  if kan > 80 and kan <=90:
    return 90
  if kan > 90 and kan <=100:
    return 100
  if kan > 100 and kan <=110:
    return 110
  if kan > 110 and kan <=120:
    return 120
  if kan > 120 and kan <=130:
    return 130
  if kan > 130 and kan <=140:
    return 140
A = pri(list3[4])
B = pri(list3[3])
C = pri(list3[2])
D = pri(list3[1])
E = list3[0]
print(A+B+C+D+E)

### FIXED CODE ###

# B
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
a = (10 - A) % 10
b = (10 - B) % 10
c = (10 - C) % 10
d = (10 - D) % 10
e = (10 - E) % 10
 
print(A+B+C+D+E+a+b+c+d+e-max([a,b,c,d,e]))
n, m = map(int, input().split())
friend = [[0] * n for i in range(n)]
for i in range(m):
    x, y = map(int, input().split())
    x -= 1
    y -= 1
    friend[x][y] = 1
    friend[y][x] = 1
maxfriend = 0
for li in friend:
    maxfriend = max(maxfriend, sum(li))
print(maxfriend+1)

### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

n,m = map(int, input().split())
uf = UnionFind(n)
for i in range(m):
    a, b = map(int, input().split())
    uf.union(a-1,b-1)
maxn = 0
for i in range(n):
    maxn = max(maxn, uf.size(i))
print(maxn)
n = int(input())
a, b = [], []
for i in range(n):
	a[i], b[i] = map(int, input().split())

ans = 0
for i in range(n)[::-1]:
	a_, b_ = a[i] + ans, b[i]
	if a_%b_ != 0:
		ans += ((a_ // b_ + 1) * b_ - a_)

print(ans)


### FIXED CODE ###

n = int(input())
ab = []
for i in range(n):
	a, b = map(int, input().split())
	ab.append((a, b))

ans = 0
for i in range(n)[::-1]:
	a, b = ab[i][0]+ans, ab[i][1]
	if a%b != 0:
		ans += ((a//b + 1)*b - a)

print(ans)
import sys

(sn, sm) = sys.stdin.readline().split()
n = int(sn)
m = int(sm)

flg = [0 for j in range(m)]
for i in range(n):
  sa = sys.stdin.readline().split()
  if len(sa) > 1:
	  for saj in sa[1:]
    	aj = int(saj)
    	flg[aj - 1] += 1

suma = 0
for sumaj in flg:
  if sumaj == n:
    suma += 1
print(suma)

### FIXED CODE ###

import sys

(sn, sm) = sys.stdin.readline().split()
n = int(sn)
m = int(sm)

flg = [0 for j in range(m)]
for i in range(n):
  sa = sys.stdin.readline().split()
  if len(sa) > 1:
    for saj in sa[1:]:
      aj = int(saj)
      flg[aj - 1] += 1

suma = 0
for sumaj in flg:
  if sumaj == n:
    suma += 1
print(suma)
A, op, B = map(str, input().split())
A = int(A)
B = int(B)

if op == '+':
  print(A+B)
else:
  pirnt(A-B)

### FIXED CODE ###

A, op, B = map(str, input().split())
A = int(A)
B = int(B)
 
if op == '+':
  print(A+B)
else:
  print(A-B)
# -*- coding: utf-8 -*-

# Input
s = [input() for i in range(2)]
N = int(s[0])
As = sorted(list(s[1].split()))

# Proccess
for i in range(0,N):
	if As[i] == As[i+1]:
		Anser = "No"
		break
	else:
		Anser = "Yes"
		
# Output							
print(Anser)

### FIXED CODE ###

# C - Distinct or Not
N = int(input())
A = list(map(int, input().split()))

M = len(set(A))

if N == M:
    print("YES")
else:
    print("NO")
def dfs(n):
        divide=["dream","dreamer","erase","eraser"]
        if n==len(s):
                return True
        for i in divide:
                if n+len(i)<=len(s):
                        if s[n:n+len(i)]==i:
                                if dfs(n+len(i)):
                                        return True

        return False
s=input()
print("YES") if dfs(0) else print("NO")


### FIXED CODE ###

s=input().replace("eraser",",").replace("erase",",").replace("dreamer",",").replace("dream",",").replace(",","")
print("YES" if s=="" else "NO")
N, M = list(map(int, input().split()))
A = list(map(int, input().split()))

num_dict = {
    1: 2,
    2: 5,
    3: 5,
    4: 4,
    5: 5,
    6: 6,
    7: 3,
    8: 7,
    9: 6
}

# Aの各要素の画数
count_list = [num_dict[a] for a in A]

# 最小の画数
min_matches = min(count_list)

# 画数の最小の値のうち最大の数値
min_num_list = []
[min_num_list.append(a) for a in A if num_dict[a] == min_matches]
min_num = max(min_num_list)


# 数値とあまり消化数のペア
A.sort(reverse=True)
res = {a: num_dict[a]-min_matches for a in A}


def dfs(nums, target, num_count):
    if len(nums) > num_count:
        return None
    if target == 0:
        return nums
    elif target < 0:
        return None
    else:
        for a in A:
            ret = dfs(nums+[a], target-res[a], num_count)
            if ret is not None:
                return ret
        return None


for num_count in range(N//min_matches, 0, -1):
    # あまりの本数
    mod = N - min_matches*num_count

    print(num_count, mod, num_count)

    # あまりをどう分配するか(DFS)
    share = dfs([], mod, num_count)
    if share is not None:
        out_list = sorted([min_num]*(num_count-len(share))+share, reverse=True)
        out_list = [str(item) for item in out_list]
        print(''.join(out_list))
        break


### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(10000)


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

num_dict = {
    1: 2,
    2: 5,
    3: 5,
    4: 4,
    5: 5,
    6: 6,
    7: 3,
    8: 7,
    9: 6
}
A.sort(reverse=True)

# dpを計算
dp = defaultdict(lambda: -1e18)
dp[0] = 0

for i in range(2, N+1):
    dp[i] = max([dp[i-num_dict[a]]+1 for a in A])

num_count = dp[N]

out_list = []
res_N = N
for _ in range(num_count):
    for a in A:
        if dp[res_N]-1 == dp[res_N-num_dict[a]]:
            out_list.append(str(a))
            res_N = res_N - num_dict[a]
            break

print(''.join(out_list))
a,p=map(int,inqut().sprit())
print((3*a+p)//2)

### FIXED CODE ###

a,p=map(int,input().split())
print((3*a+p)//2)
N=int(Input(""))
if N % 10 == 7 || (N - N % 10) / 10 % 10 == 7 || (N - N % 100)/100 == 7:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N=int(input(""))
if N % 10 == 7 or (N - N % 10) / 10 % 10 == 7 or (N - N % 100)/100 == 7:
  print("Yes")
else:
  print("No")
s=str(input())
t=str(input())
ans='No'
if s==t:
  ans='Yes'
for i in range(len(s)):
  s.append(s[0])
  if s==t:
    ans='Yes'
print(ans)


### FIXED CODE ###

print("Yes" if input() in input()*2 else "No")
#copy code
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]

point_list = [K-Q]*N

for i in range(Q):
  point_list[A[i]] += 1
for i in range(N):
  if point_list <= 0:
    print("No")
  else:
    print("Yes")
  

### FIXED CODE ###

N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]

point_list = [K-Q]*N

for i in range(Q):
  point_list[A[i]-1] += 1
for i in range(N):
  if point_list[i] <= 0:
    print("No")
  else:
    print("Yes")
import sys
 
stringCount = int(input())
targetString = input()
 
maxCount = stringCount // 2
 
for exclusionCount in range(maxCount):
    count = maxCount - exclusionCount
 
    for i in range(maxCount):
        if (i + count * 2) > stringCount:
            break
 
        word = targetString[i:count]
        end = stringCount - len(word)
        if (targetString.count(word, 0, end) > 1):
            print('{}'.format(count))
            sys.exit()
 
print('0')

### FIXED CODE ###

weather = {'Sunny': 'Cloudy', 'Cloudy': 'Rainy', 'Rainy': 'Sunny'}
 
today = input()
print(weather[today])
a = int(input()) // 数の個数
b = list(map(int, input().split())) // それぞれの値
min = 100000
for i in range(a):
  n = 0
  try = 0
  while(2**n <= b[i]):
    try += (b[i] / 2**n)
  if try < min :
    min = try
print(min)

### FIXED CODE ###

a = int(input())
b = list(map(int, input().split()))
count = 0
while(1):
  flag = 0
  for i in range(0, a, 1):
    if (b[i] % 2 == 1) :
      flag = 1
  if (flag == 1) :
    break
  for i in range(0, a, 1):
    b[i] /= 2
  count += 1
print(count)
N, K = map(int, input().split())
h = [int(input()) for i in range(N)]
h.sort()
l = [0 for i in range(N - K + 1)]
for i in range(N - K + 1):
    l[i] = h[i + 2] - h[i]
print(min(l))

### FIXED CODE ###

N, K = map(int, input().split())
h = [int(input()) for i in range(N)]
h.sort()
mini = 10**10
for i in range(N - K + 1):
    mini = min(mini, h[i+K-1] - h[i])
print(mini)
n=int(input)
lis=list(map(int,input().split()))
an=0
ans=0
for i in range(n-1):
  if lis[i]>=lis[i+1]:
    an += 1
  else:
    ans =max(ans,an)
    an=0
ans=max(ans,an)
print(ans)

### FIXED CODE ###

n=int(input())
lis=list(map(int,input().split()))
an=0
ans=0
for i in range(n-1):
  if lis[i]>=lis[i+1]:
    an += 1
  else:
    ans =max(ans,an)
    an=0
ans=max(ans,an)
print(ans)
n = int(input())
sum =0
for j in range(n):
  i,c = input().split()
  if c =="JPY":
    sum+=i
  else:
    sum+=float(i)*380000
print(sum)

### FIXED CODE ###

n = int(input())
sum =0
for j in range(n):
  i,c = input().split()
  if c =="BTC":
    sum+=float(i)*380000
  else:
    sum+=int(i)
print(sum)
import math
 
h = float(input())
enemies = [h]

count = 0
while len(enemies) > 0:
  temp = []
  for enemy in enemies:
    count+=1
    if enemy > 1:
      temp.append(round(enemy / 2))
      temp.append(round(enemy / 2))
  enemies = temp

print(count)

### FIXED CODE ###

import math

val = input().split(' ')
h = float(val[0])
a = float(val[1])

print(math.ceil(h/a))