Harryxun/stf_run huggingface dataset:
n, k = map(int, input().split())
q = list(map(int, input().split()))
v = [-1]*(n+1)
p = []
a = 1
c = 0
while 1:
    if v[a] != -1:
        l = c-v[a]
        if k < c:
            print(p[k])
        else:
            print(p[(k-v[a])%l+v[a]])
        break
    v[a] = c
    c += 1
    p.append(a)
    a = q[a]

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))
visited = [False]*N
path = [0]
at = 0
loop = 0
visited[0]=True
for i in range(N):
    at = A[at]-1
    if visited[at]:
        loop = i+1-path.index(at)
        break
    else:
        visited[at]=True
        path.append(at)
if K < len(path):
    print(path[K]+1)
else:
    print(path[(K-path.index(at))%loop+path.index(at)]+1)
n,k = map(int ,input().split())
A = tuple(map(int, input().split()))
seen = [-1]*n
tmp = 0
count = 0

while True:
    tmp = A[tmp]-1
    count +=1
    if seen[tmp] != -1:
        seennum = seen.count(1)

        tm = tmp
        se = [-1]*n
        roopmem = []
        while True:

            if se[tm] != -1:
                roop = se.count(1)
                break
            else:
                roopmem.append(tm)
                se[tm] = 1
                tm = A[tm] - 1

        break
    else:
        seen[tmp] = 1

if k<=n:
    no = 0
    for i in range(k):
        no = A[no]-1
    print(no+1)
else:
    tmp = k-seennum
    tmp %= roop
    print(roopmem[tmp-1]+1)


### FIXED CODE ###

s = input()
t = input()
for i in range(len(s)):
    if s[i] != t[i]:
        print('No')
        exit()
print('Yes')
import math


N, X = list(map(int, input().split()))
x = list(map(int, input().split()))
# print(N, X, x)

minimum = x[0]
for i in range(len(x)):
    x[i] = x[i] - X
    minimum = min(x[i], minimum)
# print(x, minimum)

gcd = math.gcd(x[0], x[0])
for i in range(len(x)):
    gcd = math.gcd(gcd, x[i])
    # print(gcd)
print(gcd)


### FIXED CODE ###

import fractions

N, X = list(map(int, input().split()))
x = list(map(int, input().split()))
# print(N, X, x)

minimum = x[0]
for i in range(len(x)):
    x[i] = x[i] - X
    minimum = min(x[i], minimum)
# print(x, minimum)

gcd_value = fractions.gcd(x[0], x[0])
for i in range(len(x)):
    gcd_value = abs(fractions.gcd(gcd_value, x[i]))
    # print(gcd)
print(gcd_value)
import numpy as np
N, M = map(int, input().split())
X = list(map(int, input().split()))

if M == 1:
    print(0)
else:
    X.sort()
    X_difs = np.array(X)
    X_difs = np.diff(X_difs)
    X_difs[::-1].sort()
    for _ in range(N-1):
        X_difs = np.delete(X_difs, 0)
        
    print(sum(X_difs))


### FIXED CODE ###

N, M = map(int, input().split())
X = list(map(int, input().split()))
if M == 1 or N>=M:
    print(0)
else:
    X.sort()
    X_difs = [X[i+1] - X[i] for i in range(M-1)]
    X_difs.sort()
    for _ in range(N-1):
        X_difs.pop(-1)
    print(sum(X_difs))
N, K = map(int, input().split())
XY = [list(map(int, input().split())) for _ in range(N)]

XY.sort(key=lambda x: x[0])

ans = float("INF")
for i in range(N):
    for j in range(i+K-1, N):
        W = XY[j][0] - XY[i][0]
        Y = [XY[x][1] for x in range(i, j+1)]
        Y.sort()
        for k in range(len(Y)):
            for l in range(k+K-1, N):
                H = Y[l] - Y[k]
                ans = min(ans, W*H)

print(ans)

### FIXED CODE ###

N, K = map(int, input().split())
XY = [list(map(int, input().split())) for _ in range(N)]

XY.sort(key=lambda x: x[0])

ans = float("INF")
for i in range(N):
    for j in range(i+K-1, N):
        W = XY[j][0] - XY[i][0]
        Y = [XY[x][1] for x in range(i, j+1)]
        Y.sort()
        for l, k in zip(Y, Y[K-1:]):
                H = k - l
                ans = min(ans, W*H)

print(ans)
n = int(input())
a = list(map(int, input().split()))
dic = {}
dic[0] = 1
total = 0
for i in range(n):
  total += a[i]
  dic[total] += 1
ans = 0
for v in dic.values():
  ans += v*(v-1) // 2
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
dic = {}
dic[0] = 1
total = 0
for i in range(n):
  total += a[i]
  if total in dic:
    dic[total] += 1
  else:
    dic[total] = 1
ans = 0
for v in dic.values():
  ans += v*(v-1) // 2
print(ans)
n = int(input())
odd = []
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        odd.append(i)
print(len(odd))


### FIXED CODE ###

num = input().split()
a = int(num[0])
b = int(num[1])
c = int(num[2])
ans = b + c - a
if ans > 0:
    print(ans)
else:
    print(0)
import re

s = input()
ans = max(
    len(m.group()) for m in re.findall('[AGCT]+'),
    default=0
)

print(ans)


### FIXED CODE ###

import re

s = input()
ans = max(
    map(len, re.findall('[AGCT]+', s)),
    default=0
)

print(ans)
from sys import stdin
from collections import deque
N, M = map(int, stdin.readline().rstrip().split())
A = [int(x) for x in stdin.readline().rstrip().split()]
A.sort()
A = deque(A)
X = [[int(x) for x in stdin.readline().rstrip().split()] for _ in range(M)]
Y = []
for b, c in X:
    Y.extend([c] * b)
Y.sort()
Y = deque(Y)

for i in range(len(X) if len(X) < len(A) else len(A)):
    a = A.popleft()
    c = Y.pop()
    if a < c:
        A.append(c)
    else:
        A.append(a)
        print(sum(A))
        quit()
print(sum(A))

### FIXED CODE ###

A, B = map(int, input().split())
if A >= 13:
    print(B)
elif 6 <= A <= 12:
    print(int(B / 2))
else:
    print(0)
n,k = map(int, input().split())
a = list(map(int, input().split()))
number = [0]*n
for i in range(n):
    number[a[i]-1]+=1
number.sort(reversed=True)
ans = 0

for i in range(k):
    ans += number[i]
ans = n-ans
print(ans)

### FIXED CODE ###

n,k = map(int, input().split())
a = list(map(int, input().split()))
number = [0]*n
for i in range(n):
    number[a[i]-1]+=1
number.sort(reverse=True)
ans = 0

for i in range(k):
    ans += number[i]
ans = n-ans
print(ans)
import math

int a = input()
print(2*a*math.pi)

### FIXED CODE ###

import math

a = int(input())
print(2*a*math.pi)
def solve():
    x, n = map(int, input().split())
    if not n:
        print(x)
        return

    ps = list(map(int, input().split()))
    flgs = [1] * 101

    for p in ps:
        flgs[p] = 0

    ansr = 101
    ansl = 101
    index = x
    while 1:
        if flgs[index] == 1:
            ansr = index
            break
        else:
            index += 1

    index = x
    while 1:
        if flgs[index] == 1:
            ansl = index
            break
        else:
            index -= 1

    if abs(ansr - x) >= abs(ansl - x):
        print(ansl)
    else:
        print(ansr)


solve()

### FIXED CODE ###

def solve():
    x, n = map(int, input().split())

    if not n:
        print(x)
        return

    ps = list(map(int, input().split()))
    flgs = [1] * 102

    for p in ps:
        flgs[p] = 0

    ansr = 101
    ansl = 101
    index = x
    while 1:
        if flgs[index] == 1:
            ansr = index
            break
        else:
            index += 1

    index = x
    while 1:
        if flgs[index] == 1:
            ansl = index
            break
        else:
            index -= 1

    if abs(ansr - x) >= abs(ansl - x):
        print(ansl)
    else:
        print(ansr)


solve()
while True:
	a,op,b=input().split()
	if op ="+":
		s=int(a)+int(b)
	elif op "-":
		s=int(a)-int(b)
	elif op ="*":
		s=int(a)*int(b)
	elif op ="/":
		s=int(a)//int(b)
	else:
		break
	print(s)


### FIXED CODE ###

while True:
	a,op,b=input().split()
	if op == "+":
		print(int(a)+int(b))
	elif op =="-":
		print(int(a)-int(b))
	elif op =="*":
		print(int(a)*int(b))
	elif op =="/":
		print(int(a)//int(b))
	else:
		break
N , K = map(int,input().split())
S = str(input())

for i in N:
    if i == K :
        S[i] == S[i].lower()
print(S)

### FIXED CODE ###

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

for i in range(1,N+1):
    if i == K :
        S[i-1] = S[i-1].swapcase()
print(''.join(S))
N, X, Y = map(int, input().split())
X -= 1
Y -= 1　　#１のところを０にするなど一つずつずらす
 
def dist(a, b):
    return min(abs(b-a), abs(X-a) + 1 + abs(b-Y), abs(Y-a) + 1 + abs(b-X))
 #＋１は間の一つ繋がっている分
 
ANS = [0] * N  　　　#0がN個のリストを作成。一つ目はk=0の時（同じところ）
for i in range(N):
    for j in range(i):
        ANS[dist(i, j)] += 1　　#0にずらしたことで０から始まるi,jに対応できている
        
        #i,jの最小値のindexに１ずつ足していく
        
for a in ANS[1:]:　#indexが１以降（数字の差が１以上）のものを一つづつ出力
  print(a)

### FIXED CODE ###

N, X, Y = map(int, input().split())
X -= 1
Y -= 1
 
def dist(a, b):
  return min(abs(b-a), abs(X-a) + 1 + abs(b-Y), abs(Y-a) + 1 + abs(b-X))

ANS = [0] * N
for i in range(N):
  for j in range(i):
    ANS[dist(i, j)] += 1

        
for a in ANS[1:]:
  print(a)
def main():
    n = int(input())
    ans = []
    while n>26:
        p = n//26
        k = n-26*p
        ans.append(k)
        n = p
    ans.append(n)
    ans = ans[::-1]
    b = []
    for a in ans:
        if int(a)==0:
            t = b.pop(-1)
            if t=='a':
                s = 'z'
            else:
                s = chr(ord(t)-1)
            b.append(s+'z')
        else:
            b.append(chr(96+int(a)))
    print(''.join(b))

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    n = int(input())
    ans = []
    while n>25:
        p = n//26
        k = n-26*p
        if k==0:
            ans.append(26)
            n = p-1
        else:
            ans.append(k)
            n = p
    if n!=0:
        ans.append(n)
    ans = ans[::-1]
    b = []
    for i in range(len(ans)):
        b.append(chr(96+ans[i]))

    print(''.join(b))

if __name__ == "__main__":
    main()
import math
from functools import reduce

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

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

print(gcd(*A))

### FIXED CODE ###

import fractions
from functools import reduce

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

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

print(gcd_list(A))
import collections

n = int(input())

x = [0]*n
y = [0]*n
h = [0]*n
H = [0]*n

for i in range(n):
  x[i], y[i], h[i] = map(int, input().split())
  
for cx in range(101):
  for cy in range(101):
    for i in range(n):
      H[i] = max(h[i] + abs(x[i]-cx) + abs(y[i]-cy), 0)
    c = collections.Counter(H)
    if len(c) == 1 && H[0] >= max(h):
      print(cx, cy, H[0])
      exit()

### FIXED CODE ###

N = int(input())
xyh = [list(map(int, input().split())) for _ in range(N)]
xyh.sort(key=lambda val: val[2])
 
for cx in range(101):
    for cy in range(101):
        check = True
        H = xyh[-1][2] + abs(xyh[-1][0] - cx) + abs(xyh[-1][1] - cy)
        for x in xyh[:-1]:
            if x[2] != max(H - abs(x[0] - cx) - abs(x[1] - cy), 0):
                check = False
                break
        if check:
            print(cx, cy, H)
            exit()
import sys

s = input()
t = input()

count =0
for i, c in enuemrate(s):
    if c == t[i]:
        count += 1
print count

### FIXED CODE ###

import sys

s = raw_input()
t = raw_input()

count =0
for i, c in enumerate(s):
    if c == t[i]:
        count += 1
print count
a,b = map(int,input().split())
if 1<=a<=100 and 1<=b<=100:
  return a*b

### FIXED CODE ###

a,b = map(int,input().split())
print(a*b)
a,s,d=map(int,input().split())
if s-d>=0:
  print("delicious")
elif a+s-d>=-:
  print("safe")
else:
  print("dangerous")

### FIXED CODE ###

a,s,d=map(int,input().split())
if s-d>=0:
  print("delicious")
elif a+s-d>=0:
  print("safe")
else:
  print("dangerous")
import fraction

def lcm(x, y):
    return (x * y) // fraction.gcd(x, y)

def multiple(A, B, C): #number of multiples of C between A and B
    return int((B+0.5)//C - (A-0.5)//C)

A, B, C, D = map(int, input().split())

allnumbers = B-A+1

ans = allnumbers - (multiple(A,B,C) + multiple(A,B,D) - multiple(A,B,lcm(C,D)))

print(ans)


### FIXED CODE ###

import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def multiple(A, B, C): #number of multiples of C between A and B
    return B//C - (A-1)//C

A, B, C, D = map(int, input().split())

allnumbers = B-A+1

ans = allnumbers - (multiple(A,B,C) + multiple(A,B,D) - multiple(A,B,lcm(C,D)))

print(ans)
a,b,c = map(int,input().split())

if int(b/a) >= c:
  print(c)
elif:
  print(int(b/a))


### FIXED CODE ###

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

if b//a >= c:
  print(c)
else:
  print(b//a)
a=input()
b=input()
Z=list['1','2','3']
X=Z.remove('a','b')

print(X)


### FIXED CODE ###

a=int(input())
b=int(input())
Z=[1,2,3]
Z.remove(a)
Z.remove(b)

print(Z[0])
from math import gcd
n=int(input())
a=list(map(int,input().split()))
b=[]
for i in range(n):
  b+=gcd(a[i],a[i-1])
b.sort()
print(b[2])

### FIXED CODE ###

import math

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

def segfunc(x, y):
    return math.gcd(x,y)

def init(init_val):
    # set_val
    for i in range(n):
        seg[i+num-1] = init_val[i]
    # built
    for i in range(num-2, -1, -1):
        seg[i] = segfunc(seg[2*i+1], seg[2*i+2])

def update(k, x):
    k += num - 1
    seg[k] = x
    while k:
        k = (k-1)//2
        seg[k] = segfunc(seg[2*k+1], seg[2*k+2])

def query(p, q):
    if q <= p:
        return ide_ele
    p += num - 1
    q += num - 2
    res = ide_ele
    while q-p>1:
        if p&1 == 0:
            res = segfunc(res, seg[p])
        if q&1 == 1:
            res = segfunc(res, seg[q])
            q -= 1
        p = p//2
        q = (q-1)//2
    if p == q:
        res = segfunc(res, seg[p])
    else:
        res = segfunc(segfunc(res, seg[p]), seg[q])
    return res

# identity element
ide_ele = 0

# num: n以上の最小の2のべき乗
num = 2**(n-1).bit_length()
seg = [ide_ele]*2*num

a=init(a)

ans=1
for i in range(n):
    ans=max(ans,math.gcd(query(0,i),query(i+1,n)))


print(ans)
import math
def ncr(n,r):
  return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))
n,p=map(int,input().split())
l=list(map(int,input().split()))
l1=[]
l2=[]
for i in l:
  if i%2==0:
    l1.append(i)
  else:
    l2.append(i)
c=0
su=0
le1=len(l1)
le2=len(l2)
while True:
  if le1+le2<c:
    break
  if c%2==0:
    if le1+le2>=c:
      su+=ncr(le1+le2,c)
    c+=1
  else:
    if le1>=c:
      su+=ncr(le1,c)
    c+=1
if p==0:
  print(su)
else:
  dkafj;lsjfal;

### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

# nCr
def nCr(n,r):
  if n<r:
    return 0
  return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))

def main():
  n,p=LI()
  l=LI()

  la=[]
  lb=[]

  for x in l:
    if x%2==1:
      la.append(x)
    else:
      lb.append(x)

  # lbから偶数個選ぶ方法は何通り？
  bc=0
  for i in range(len(lb)+1):
    bc+=nCr(len(lb),i)
    # print(bc)

  ans=0
  for i in range(len(la)+1):
    if p==0:
      r=i*2
    else:
      r=i*2+1

    ans+=nCr(len(la),r)*bc

  return ans

print(main())
H, W = map(int, input().split())
matrix = [input() for i in range(H)] 
ans = ""  
for h in range(H):
        for w in range(W):
                bomb = 0 
                for i in range(-1, 2): 
                        if 0 <= h - 1 and 0 <= w + i < W:
                                if matrix[h - 1][w + i] == "#":
                                        bomb += 1
                        if h + 1 < H and 0 <= w + i < W:
                                if matrix[h + 1][w + i] == "#":
                                        bomb += 1
                for i in range(-1, 2, 2): 
                        if 0 <= w + i < W:
                                if matrix[h][w + i] == "#":
                                        bomb += 1
                if matrix[h][w] == "#":
                        ans += "#" 
                else:
                        ans += str(bomb)
                if w % (W - 1) == 0 and w != 0:
                        ans += "\n"
print(ans)

### FIXED CODE ###

H, W = map(int, input().split())
matrix = [input() for i in range(H)] 
ans = ""  
for h in range(H):
        for w in range(W):
                bomb = 0 
                for i in range(-1, 2): 
                        if 0 <= h - 1 and 0 <= w + i < W:
                                if matrix[h - 1][w + i] == "#":
                                        bomb += 1
                        if h + 1 < H and 0 <= w + i < W:
                                if matrix[h + 1][w + i] == "#":
                                        bomb += 1
                for i in range(-1, 2, 2): 
                        if 0 <= w + i < W:
                                if matrix[h][w + i] == "#":
                                        bomb += 1
                if matrix[h][w] == "#":
                        ans += "#" 
                else:
                        ans += str(bomb)
                if W - 1 > 0:
                        if w % (W - 1) == 0 and w != 0:
                                ans += "\n"
                else:
                                ans += "\n"
print(ans)
n,k = map(int,input().split())
l = list(map(int,input().split()))
ls = []
for i in range(n-k):
  if l[i] <0 and l[i+k-1]<=0:
    ls.append(abs(l[i]))
  elif l[i] >=0 and l[i+k-1]>0:
    ls.append(abs(l[i+k-1]))
  elif l[i] =<0 and l[i+k-1]>=0:
    ls.append(2*min(abs(l[i]),l[i+k-1]) + max(abs(l[i]),l[i+k-1]))
print(min(ls))

### FIXED CODE ###

n,k = map(int,input().split())
l = list(map(int,input().split()))
ls = []
for i in range(n-k+1):
  a = l[i]
  b = l[i+k-1]
  ls.append(min(abs(a)+abs(a-b), abs(b)+abs(a-b)))
print(min(ls))
import itertools

def solve(S):
    '''
    数字の間に+を入れるパターンと入れないパターンを全てチェックする
    125であれば、 125, 1+25, 12+5, 1+2+5
    +が入る可能性のある場所は右の通り、 1  |ここ!| 2  |ここ!| 5
    よって、組み合わせは 2 ** (文字列数 - 1)
    '''
    count = 0
    bit_list = list(itertools.product([0, 1], repeat=len(S)-1))
    for pattern in bit_list:
            '''
            ビットの値が1の時に+が入ると考えて、0の時は入らない
            文字列を先頭から調べていき、次の文字との間に+が入る場合、そこまでの文字列をint型に変換して変数「count」に加算する
            
            '''
        start = 0
        for end in range(len(pattern)):
            if pattern[end] == 1:
                count += int(S[start:end+1])
                start = end + 1
                
            if end == len(bit) - 1:
                count += int(S[start:])
                
    print(count)


if __name__ == '__main__':
    S = input()
    solve(S)

### FIXED CODE ###

s = input()
n = len(s)
res = 0
for i in range(2**(n-1)):
    k = 0
    b = bin(i)[2:]
    for j in range(len(b)):
        if b[-(j+1)] == '1':
            res += int(s[k:j+1])
            k = j+1
    res += int(s[k:])

            
print(res)
S,T=map(input()split())
print(T.S)

### FIXED CODE ###

S,T=input().split()
S=T+S
print(S)
N = int(input())
d = {}
for i in range(N):
    d.add(int(input()))
print(len(d))


### FIXED CODE ###

N = int(input())
d = []
for i in range(N):
    d.append(int(input()))
print(len(set(d)))
import fractions
n=int(input())
t=[int(input()) for i in range(n)]
t.sort()
check=t[0]
for i in range(n-1):
    f1=fractions.gcd(t[i],t[i+1])
    f2=t[i]*t[i+1]//f1
    check=f2
print(f2)

### FIXED CODE ###

import fractions
n=int(input())
t=[int(input()) for i in range(n)]
t.sort()
check=t[0]
if n==1:
    print(check)
else:
    for i in range(n-1):
        f1=fractions.gcd(check,t[i+1])
        f2=check*t[i+1]//f1
        check=f2
    print(f2)
n,k = map(int,input().split())
h = list(map(int,input().split()))

h.sort()

for i in range(k):
    h[n-1-i] = 0

s = sum(h)

print(s)


### FIXED CODE ###

n,k = map(int,input().split())
h = list(map(int,input().split()))

h.sort()

if k > n:
    print(0)
    exit()

for i in range(k):
    h[n-i-1] = 0

s = sum(h)

print(s)
inp1 = input().split()
inp2 = input().split()
a = int(inp1[0])
b = inp2
b = [int(s) for s in inp2]
ansno = a
maxno = b[0]

ii = 0
for i in b:
  if i ==0:
    continue
  if maxno < i:
    maxno = i
    ansno -= 1
    continue
  bslice = b[:ii]
  b[:ii].sort(reverse=True)
  bsort = b[:ii]
  if bslice != bsort:
    ansno -=1
    print(bslice,bsort)
    print("sort")
  ii+=1
print(ansno)


### FIXED CODE ###

inp1 = input().split()
a = int(inp1[0])
b = int(inp1[1])

if b ==0:
  print("No")
else:
  c = a%b
  if c == 0:
    print("Yes")
  else:
    print("No")
import numpy as np
from numba import njit

@njit(cache=True)
def light(n,a_list):
    outcome= np.zeros(n+1, dtype=np.int64)
    for i in range(n):
        outcome[max(0,i-a_list[i])] += 1
        outcome[min(n,i+a_list[i]+1)] -= 1
    outcome = np.cumsum(outcome)[:-1]
    return outcome
 
for _ in range(k):
    if min(a) == n:
        break
    a = light(n,a)
 
[print(aa,end=' ') for aa in a]

### FIXED CODE ###

N, K = map(int, input().split())
import numpy as np
A = np.array(input().split(), dtype=int)
I = np.arange(0, N)
for i in range(K):
  X = np.zeros(N + 1, int)
  np.add.at(X, np.maximum(0, I - A), 1)
  np.add.at(X, np.minimum(N, I + A + 1), -1)
  A = X.cumsum()[:-1]
  if np.all(A == N):
    break
print(*A)
N, K = input().split()
l = input().split()
l = list(map(int, l))
l.sort(reverse=True)

sum = 0
for i in range(K):
  sum += l[i]

print(sum)

### FIXED CODE ###

b = input().split()

if int(b[0]) % 3 == 0:
  print("Possible")
elif int(b[1]) % 3 == 0:
  print("Possible")
elif (int(b[0]) + int(b[1])) % 3 == 0:
  print("Possible")
else:
  print("Impossible")
N,M = map(int,input().split())
a_list = []
b_list = []
c_list = []
d_list = []
lists = []
for i in range(N):
    a,b = map(int,input().split())
    a_list.append(a)
    b_list.append(b)
for i in range(M):
    c,d = map(int,input().split())
    c_list.append(c)
    d_list.append(d)
for i in range(N):
    min = abs(a_list[0] - c_list[0]) + abs(b_list[0] - d_list[0])
    for j in range(M):
        distance = abs(a_list[i] - c_list[j]) + abs(b_list[i] - d_list[j])
        if min > distance:
            min = distance
            index = j
    lists.append(index+1)
for i in range(len(lists)):
    print(lists[i])


### FIXED CODE ###

N,M = map(int,input().split())
a_list = []
b_list = []
c_list = []
d_list = []
lists = []
for i in range(N):
    a,b = map(int,input().split())
    a_list.append(a)
    b_list.append(b)
for i in range(M):
    c,d = map(int,input().split())
    c_list.append(c)
    d_list.append(d)
for i in range(N):
    min = 9999999999999999999999999
    for j in range(M):
        distance = abs(a_list[i] - c_list[j]) + abs(b_list[i] - d_list[j])
        if min > distance:
            min = distance
            ind = j
    lists.append(ind+1)
for i in range(len(lists)):
    print(lists[i])
lis = []
for i in xrange(10):
 lis.append(input())
for a in sorted(lis,reversed=True)[:3]:
 print a

### FIXED CODE ###

lis = []
for i in xrange(10):
 lis.append(input())
for a in sorted(lis,reverse=True)[:3]:
 print a
import sys
input = sys.stdin.buffer.readline
n = int(input())
a = list(map(int, input().split()))
from fractions import gcd
def lcm(x,y):
  return (x*y)//gcd(x,y)
l = 1
mod = 10**9+7
for i in range(n):
  l = lcm(l, a[i])
ans = 0
for i in range(n):
  ans += l // a[i]
print(ans%mod)


### FIXED CODE ###

if eval(input().replace(' ','==')):
  print('Yes')
else:
  print('No')
def atc_142b(NK_input: str, hi_input: str) -> int:
    N, K = map(int, NK_input.split(" "))
    hi = [int(i) for i in hi_input.split(" ")]
    hi = sorted(hi)
    for i in range(0, len(hi)):
        if hi[i] >= K:
            return len(hi) - i
    return 0

NK_input_value = input()
hi_input_value = input()
pritn(atc_142b(NK_input_value, hi_input_value))


### FIXED CODE ###

def atc_142b(NK_input: str, hi_input: str) -> int:
    N, K = map(int, NK_input.split(" "))
    hi = [int(i) for i in hi_input.split(" ")]
    hi = sorted(hi)
    for i in range(0, len(hi)):
        if hi[i] >= K:
            return len(hi) - i
    return 0


NK_input_value = input()
hi_input_value = input()
print(atc_142b(NK_input_value, hi_input_value))