Harryxun/stf_run huggingface dataset:
# import math
import fractions
import numpy as np
from itertools import accumulate, chain, islice, starmap
N = int(input())
numbers = list(map(int, input().split()))
# numbers = [2, 4, 8, 8]
# N = len(numbers)


def calculate_maximum_subgcd_with_np_ufunc(numbers):
    gcd = np.frompyfunc(fractions.gcd, 2, 1)
    cumgcds = gcd.accumulate(numbers, dtype=np.object).astype(np.int)
    sub_cumgcds = np.roll(cumgcds, 1)
    sub_cumgcds[0] = 0
    reverse_cumgcds = gcd.accumulate(
        numbers[::-1], dtype=np.object).astype(np.int)
    sub_reverse_cumgcds = np.roll(reverse_cumgcds, 1)
    sub_reverse_cumgcds[0] = 0
    return np.max(gcd(sub_cumgcds, sub_reverse_cumgcds[::-1]))


def calculate_maximum_subgcd_with_func(numbers):
    operation = fractions.gcd
    cumgcds = accumulate(numbers, operation)
    sub_cumgcds = islice(chain([0], cumgcds), len(numbers))
    reverse_cumgcds = accumulate(numbers[::-1], operation)
    sub_reverse_cumgcds = islice(chain([0], reverse_cumgcds), len(numbers))
    sub_gcds = starmap(operation, zip(sub_cumgcds, list(sub_reverse_cumgcds)[::-1]))
    return max(sub_gcds)


calculate_maximum_subgcd = calculate_maximum_subgcd_with_np_ufunc
# calculate_maximum_subgcd = calculate_maximum_subgcd_with_func

print(calculate_maximum_subgcd(numbers))


### FIXED CODE ###

A, B, T = map(int, input().split())
# A, B, T = 20, 20, 19


def count_total_biscuit(A, B, T):
    return (T // A) * B


print(count_total_biscuit(A, B, T))
N, T = map(int, input().split())

ans = 10 ** 9

for _ in rnage(N):
    a, b = map(int, input().split())
    if b <= T:
        ans = min(ans, b)

if ans == 10 ** 9:
    print('TLE')
else:
    print(ans)

### FIXED CODE ###

N, T = map(int, input().split())

ans = 10 ** 9

for _ in range(N):
    a, b = map(int, input().split())
    if b <= T:
        ans = min(ans, a)

if ans == 10 ** 9:
    print('TLE')
else:
    print(ans)
from sys import stdin 
import math
a,b = [int(x) for x in stdin.readline().rstrip().split()]
answer = a * b // math.gcd(a, b)
print(answer)

### FIXED CODE ###

from sys import stdin 
import fractions
a,b = [int(x) for x in stdin.readline().rstrip().split()]
answer = a * b // fractions.gcd(a, b)
print(answer)
S = input()
K = int(input())
if K == 1:
	print(int(S[i]))
else:
	if S[0] == "1":
		print(S[1])
	else:
		print(S[0])

### FIXED CODE ###

S = input()
K = int(input())
ans = 1
if K == 1:
	print(S[0])
	exit()
else:
	for i in range(len(S)):
		if S[i] != "1" and i < K:
			ans = int(S[i])
			break
print(ans)
N, u, v = map(int, input().split())
u -= 1
v -= 1
edges = [[] for _ in range(N)]
for _ in range(N - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    edges[a].append(b)
    edges[b].append(a)

dist = [0] * N
def dfs(v, d=0, p=-1):
    global dist
    dist[v] = d
    for u in edges[v]:
        if u == p:
            continue
        dfs(u, d + 1, v)

def calc_dist(s):
    global dist
    dist = [0] * N
    dfs(s)
    return dist

distS = calc_dist(u)
distT = calc_dist(v)

mx = 0
for i in range(N):
    if distS[i] < distT[i]:
        mx = max(mx, distT[i])
ans = mx - 1
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)
N, u, v = map(int, input().split())
u -= 1
v -= 1
edges = [[] for _ in range(N)]
for _ in range(N - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    edges[a].append(b)
    edges[b].append(a)

dist = [0] * N
def dfs(v, d=0, p=-1):
    global dist
    dist[v] = d
    for u in edges[v]:
        if u == p:
            continue
        dfs(u, d + 1, v)

def calc_dist(s):
    global dist
    dist = [0] * N
    dfs(s)
    return dist

distS = calc_dist(u)
distT = calc_dist(v)

mx = 0
for i in range(N):
    if distS[i] < distT[i]:
        mx = max(mx, distT[i])
ans = mx - 1
print(ans)
print(abs((int(input())-2)*(int(input())-2)))

### FIXED CODE ###

a,b=map(int,input().split());print(abs((a-2)*(b-2)))
#-*- coding: utf-8 -*-

def knapsack2(items, W):
    N = len(items)
    C = [[0 for _i in xrange(W+1)] for _j in xrange(N+1)]
    for i in range(N+1)[1:]:
        v, w = items[i-1]
        for j in range(W+1)[1:]:
            if j < w:
                C[i][j] = C[i-1][j]
            else:
                C[i][j] = max(C[i-1][j-w]+v, C[i-1][j])

    return C[-1][-1]


def input_str(row):
    res = []
    for _ in xrange(row):
        res.append(raw_input().split())
    return res


N, W = [int(i) for i in raw_input().split()]
wvlist = input_str(N)
items = [(int(v), int(w)) for w, v in wvlist]
print knapsack2(items, W)

### FIXED CODE ###

# -*- coding: utf-8 -*-
def input_str(row):
    res = []
    for _ in range(row):
        res.append(raw_input().split())
    return res

ipt = input_str(2)
N, T = [int(i) for i in ipt[0]]
t = sorted([int(i) for i in ipt[1]])

total = 0
for i, ti in enumerate(t[:-1]):
    if t[i+1] - t[i] > T:
        total += T
    else:
        total += t[i+1] - t[i]

print total + T
a,b = int(input())
print(max(a+b,a-b,a*b))

### FIXED CODE ###

a,b = map(int,input().split())
print(max(a+b,a-b,a*b))
n,a,b=map(int,input().split()
print(n*min(a,b))

### FIXED CODE ###

n,a,b=map(int,input().split())
print(min(n*a,b))
A = int(input())
B = int(input())
if(A>=13):
  print(B)
elif(13>A)and(A>5):
  print(B/2)
else:
  print(0)

### FIXED CODE ###

A,B = map(int,input().split())
if(A<=5):
  print(0)
else:
  if(A<13):
    V = B//2
    print(V)
  else:
    print(B)
in1 = list(map(int,input().split()))
D = in1[0]
T = in1[1]
S = in1[2]

if D =< T * S:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

in1 = list(map(int,input().split()))
D = in1[0]
T = in1[1]
S = in1[2]

if D <= T * S:
    print('Yes')
else:
    print('No')
import sys
input = sys.stdin.readline().rstrip
X = int(input())
if X == 2:
    print(2)
elif X%2 == 0:
    X += 1
    for num in range(X, 10**6, 2):
        if is_prime(num):
            print(num)
            break
else:
    for num in range(X, 10**6, 2):
        if is_prime(num):
            print(num)
            break

### FIXED CODE ###

def is_prime(n):
    for i in range(2, n + 1):
        if i * i > n:
            break
        if n % i == 0:
            return False
    return n != 1


import sys
input = sys.stdin.readline().rstrip
X = int(input())

if X%2 == 0:
    if X == 2:
        print(2)
    else:
        X += 1
        for num in range(X, 10**6, 2):
            if is_prime(num):
                print(num)
                break
else:
    for num in range(X, 10**6, 2):
        if is_prime(num):
            print(num)
            break
a,b,c=map(int, input().split())
print((a[0]+b[0]+c[0]).upper())

### FIXED CODE ###

a,b,c=input().split()
print((a[0]+b[0]+c[0]).upper())
N = int(input())
A = list(map(int,input().split()))
j = True
count = 0
while j:
     for i in A:
             if i % 2 == 0:
                     A[A.index(i)] = i / 2
             else:
                     j = False
                  	 break
     count += 1
print(count)


### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
j = True
count = 0
while j :
     for i in A:
             if i % 2 == 0 or i == 0:
                     A[A.index(i)] = i / 2
             else:
                     j = False
     if j == True:             
     	count += 1
print(count)
S = input()
cnt = 0
S = list(S)
S_t = S[0]
S.pop(0)
S_b = S[-1]
S.pop(-1)
for i in range(S):
    cnt += 1

print(S_t + cnt + S_b)

### FIXED CODE ###

S = input()
cnt = 0
S = list(S)
S_t = S[0]
S.pop(0)
S_b = S[-1]
S.pop(-1)
for i in range(len(S)):
    cnt += 1

print(S_t + str(cnt) + S_b)
N,Q = map(int,input().split())
K = [[] for _ in range(N+1)]
nums = [0] * (N+1)

def dfs(now,parent):
    for i in K[now]:
        if i != parent:
            nums[i] += nums[now]
            dfs(i,now)

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

for _ in range(Q):
    p, x = map(int, input().split())
    nums[p] += x
dfs(1,0)
print(*nums[1:])

### FIXED CODE ###

import sys
 
sys.setrecursionlimit(10 ** 6)

def input():
    return sys.stdin.readline().strip()
def main():
    N,Q = map(int,input().split())
    K = [[] for _ in range(N+1)]
    nums = [0 for _ in range(N+1)]

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

    for _ in range(Q):
        p, x = map(int, input().split())
        nums[p] += x

    def dfs(now,parent):
        for i in K[now]:
            if i != parent:
                nums[i] += nums[now]
                dfs(i,now)

    dfs(1,0)
    print(*nums[1:])

if __name__ == '__main__':
    main()
S=input()
f=S[0]
l=S[-1]
m=len(S)-2
print(str(f+m+l))

### FIXED CODE ###

S=input()
f=S[0]
l=S[-1]
m=len(S)-2
print(f+str(m)+l)
n, m = map(int, input().split())
ed = [[] for _ in range(n)]  # グラフ
v = [None] * n
for _ in range(m):
  l, r, d = map(int, input().split())
  ed[l-1].append((r-1, d))  # l -> r
  ed[r-1].append((l-1, -d))  # r -> l

visited = [0] * n  # 訪問フラグ（非連結の可能性の為）

def dfs(start):
  s = [start]
  v[start] = 0
  while s:
    label = s.pop()
    if visited[label] == False:
      visited[label] = True
      for to, dist in ed[label]:
        if v[to] == 0:
          v[to] = v[label] + dist
          s.append(to)
        else:
          if v[to] != v[label] + dist:
            return False
  return True

is_exist = True
for i in range(n):
  if v[i] is None:
    if not dfs(i):
      print('No')
      is_exist = False
      break
if is_exist:
  print("Yes")

### FIXED CODE ###

import sys
input = sys.stdin.readline
X = int(input())
A = int(input())
B = int(input())
X -= A
X %= B
print(X)
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    a,b,c = LI()
    print(9*max(a,b,c)+a+b+c)
    return

#B
def B():
    a,b = LI()
    if a*b %2:
        print("Yes")
    else:
        print("No")
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#I
def I_():
    return

#J
def J():
    return

#Solve
if __name__ == "__main__":
    A()


### FIXED CODE ###

a,b = map(int, input().split())
if a*b %2 == 1:
    print("Yes")
else:
    print("No")
x, y = map(int, input().split(" "))
X, y = map(int, input().split(" "))
print{(x-X)*(y-Y)}

### FIXED CODE ###

H,W = map(int, input().split(" "))
h,w = map(int, input().split(" "))
print((H-h)*(W-w))
n = int(input())
s = list(input())
ans = 0
for i in range(n-2):
  if a[i]=='A' and a[i+1]=='B' and a[i+2]=='C':
    ans+=1
print(ans)

### FIXED CODE ###

n = int(input())
a = list(input())
ans = 0
for i in range(n-2):
  if a[i]=='A' and a[i+1]=='B' and a[i+2]=='C':
    ans+=1
print(ans)
length = int(input())
string = input()
count=0

for i in range(0,length):
    if ("A" == string[i]) and ("B" == string[i+1]) and ("C" == string[i+2]):
        count+=1
        i+=3

print(count)



### FIXED CODE ###

length = int(input())
string = input()
print(string.count("ABC"))
S = input()
ans = 0
ACGT = 0
for i in len(S):
  if S[i]=='A' or S[i]=='G' or S[i]=='C' or S[i]=='T':
    ACGT += 1
  else:
    ans = max(ans,ACGT)
    ACGT = 0
print(ans)


### FIXED CODE ###

S = list(input())
M = 0
count = 0
for x in S:
  if x =="A" or x =="C" or x =="T" or x =="G":
    count += 1
  else:
    count = 0
  if M<count:
    M = count
print(M)
N = int(raw_input())

for i in xrange(1, N):

    if i*i > N:
        break

    elif i*i == N:
        t = i
        break

    if N % i == 0:
        t = i

print len(str(N/t))

### FIXED CODE ###

N = int(raw_input())
t = 1
for i in xrange(1, N):

    if i*i > N:
        break

    elif i*i == N:
        t = i
        break

    if N % i == 0:
        t = i

print max(len(str(t)), len(str(N/t)))
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


def yes():
    print("YES")  # type: str


def no():
    print("NO")  # type: str


class Graph(object):

    def __init__(self, N):
        self.N = N
        self.E = defaultdict(list)

    def add_edge(self, f, t, w=1):
        self.E[f].append((t, w))
        self.E[t].append((f, w))


class UnionFind(object):

    def __init__(self, N):
        self.tree = list(range(N))

    def root(self, i):
        if self.tree[i] == i:
            return i
        else:
            self.tree[i] = self.root(self.tree[i])
            return self.tree[i]

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

    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            self.tree[x] = y


def main():

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

    # 前Nは人、後ろMは言語
    uf = UnionFind(N+M)

    for i in range(N):
        for l in L[i]:
            # 人iは言語L[i]と同じグループ
            uf.unite(i, N+l)

    # 人はすべて同じグループであるか
    flag = True
    for i in range(N):
        if not uf.same(0, i):
            flag = False
            break
    if flag:
        yes()
    else:
        no()

    pass


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
from collections import defaultdict
INF = float("inf")


def yes():
    print("YES")  # type: str


def no():
    print("NO")  # type: str


class UnionFind(object):

    def __init__(self, N):
        self.tree = list(range(N))

    def root(self, i):
        if self.tree[i] == i:
            return i
        else:
            self.tree[i] = self.root(self.tree[i])
            return self.tree[i]

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

    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x != y:
            self.tree[x] = y


def main():

    N, M = map(int, input().split())
    L = [0]*N
    lang_leader = defaultdict(int)
    for i in range(N):
        K, *L[i] = list(map(int, input().split()))
    # 前Nは人
    uf = UnionFind(N+1)
    for i in range(N):
        for l in L[i]:
            if lang_leader[l] == 0:
                lang_leader[l] = i+1
            else:
                uf.unite(i, lang_leader[l]-1)

    # print(uf.tree)
    # 人はすべて同じグループであるか
    flag = True
    for i in range(N):
        if not uf.same(0, i):
            flag = False
            break
    if flag:
        yes()
    else:
        no()

    pass


if __name__ == '__main__':
    main()
import sys

def cheaperprice(item):
    rawprice=rawprices[item]
    if item not in menus or item in checkloop:
        checkloop.append(item)
        return rawprice
    else:
        checkloop.append(item)
        indegrients=menus[item]
        combinedprice=0
        for i in indegrients:
            combinedprice+=cheaperprice(i)

        return min(combinedprice,rawprice)


n=0 #how many numbers of lists
flag=0
rawprices={}
menus={}
checkloop=[]
for line in sys.stdin:
    line=line.strip()
    if n==0:
        if flag==0 and line=='0':
            break
        elif flag!=2:
            n=int(line)
        else:
            print cheaperprice(line)
            rawprices={}
            menus={}
            checkloop=[]
        flag=(flag+1)%3
    else:
        line=line.split(' ')
        if flag==1: #rawprices
            rawprices[line[0]]=int(line[1])
        elif flag==2:
            menus[line[0]]=line[2:]
        n-=1

### FIXED CODE ###

while(1):
    n=int(raw_input())
    if n==0:
        break
    else:
        pricelist=[]
        recipedict={}
        costdict={}
        for i in range(n):
            [ii,p]=raw_input().split()
            pricelist.append([ii,int(p)])
            costdict[ii]=1000000000000
        pricelist.sort(key=lambda x:x[1])
        m=int(raw_input())
        for i in range(m):
            rec=raw_input().split()
            o=rec[0]
            k=int(rec[1])
            recipedict[o]=rec[2:]
        query=raw_input()
        while(1):
            cheapest=pricelist.pop(0)
            #if able to make
            if cheapest[0] in recipedict:
                priceifmade=0
                for reqitem in recipedict[cheapest[0]]:
                    priceifmade=priceifmade+costdict[reqitem]
                if priceifmade<cheapest[1]:
                    costdict[cheapest[0]]=priceifmade
                else:
                    costdict[cheapest[0]]=cheapest[1]
            else:
                costdict[cheapest[0]]=cheapest[1]
            for item in recipedict:
                priceifmade=0
                for reqitem in recipedict[item]:
                    priceifmade=priceifmade+costdict[reqitem]
                if priceifmade<costdict[item]:
                    costdict[item]=priceifmade
            if cheapest[0]==query:
                print costdict[cheapest[0]]
                break
def recursion(length, ll, string, cc):
    if ll * 2 < length:
        for i in range(10):
            string1 = string + str(i)
            recursion(length, ll+1, string1, cc)
    else:
        number = str(int(string) + int(cc[-ll:]))
        ds = ""
        for i in range(length // 2):
            ds += number[-i-1]
        string = ds + string
        if str(int(string) + int(cc)) == string[::-1] and string[0] != "0":
            global answer
            answer += 1
            

d = input()
plus = 0
while True:
    if d[-1] == "0":
        d = d[:-1]
        plus += 1
    else:
        break
answer = 0
recursion(len(d), 0, "", d)
recursion(len(d)+1, 0, "", d)
while plus > 0:
    if plus == 1:
        plus -= 1
        answer = answer * 9
    else:
        plus -= 1
        answer *= 10
print(answer)


### FIXED CODE ###

def result(letters, number, cant_zero):
    if letters <= 1:
        if number == 0:
            return 10 ** letters
        return 0
    diff = (10 - number%10) % 10
    variants = number % 10 - cant_zero
    if number % 10 == 0:
        variants = 10 - cant_zero
    number -= diff * (10**(letters-1) - 1)
    number = abs(number // 10)
    return variants * result(letters-2, number, 0)

d = int(input())
ans = 0
for i in range(20):
    ans += result(i, d, 1)
print(ans)
N,M=map(int,input().split(" "))

listing=[]
for i in range(M):
    a=list(map(int,input().split(" ")))
    listing.append(a)


aa=list(map(list, set(map(tuple, listing))))

for i in aa:
    



if(N==1 and aa[0][0]==1):
    print(aa[0][1])
    exit()



a1=[]
a2=[]
for i in aa:
    a1.append(i[0])
    a2.append(i[0])
if(len(a1)!=len(set(a2))):
    print(-1)
    exit()

num=""
#print(aa)
digit=1
digit1=1
for i in range(N):
    digit1=1
    for j in aa:
        if(j[0]==1 and j[1]==0):
            print(-1)
            exit()
        if(j[0]==digit):
            num+=str(j[1])
            digit1=digit+1
            break
    if(digit1==digit):
        if(digit==1):
            num+="1"
        else:
            num+="0"
    digit+=1
print(num)
            


### FIXED CODE ###

N,M=map(int,input().split(" "))

if(M==0):
    if(N==1):
        print(0)
    elif(N==2):
        print(10)
    elif(N==3):
        print(100)
    exit()



listing=[]

for i in range(M):
    a=list(map(int,input().split(" ")))
    listing.append(a)


aa=list(map(list, set(map(tuple, listing))))




a1=[]
a2=[]
for i in aa:
    a1.append(i[0])
    a2.append(i[0])
if(len(a1)!=len(set(a2))):
    print(-1)
    exit()

if(N==1 and aa[0][0]==1):
    print(aa[0][1])
    exit()
num=""
#print(aa)
digit=1
digit1=1
for i in range(N):
    digit1=digit
    for j in aa:
        if(j[0]==1 and j[1]==0):
            print(-1)
            exit()
        if(j[0]==digit):
            num+=str(j[1])
            digit1=digit+1
            break
    if(digit1==digit):
        if(digit==1):
            num+="1"
        else:
            num+="0"
    digit+=1
print(num)
a,b,c = map(int,input().split())
if a=5 and b=5 and c=7:
    print('YES')
elif a=5 and b=7 and c=5:
    print('YES')
elif a=7 and b=5 and c=5:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

a,b,c = map(int,input().split())
if a==5 and b==5 and c==7:
    print('YES')
elif a==5 and b==7 and c==5:
    print('YES')
elif a==7 and b==5 and c==5:
    print('YES')
else:
    print('NO')
# 最大で5文字になりそうなので上位K個を保持しつつ全探索
s = input()
k = int(input())
ans = []
for i in range(len(s)):
    for j in range(i + 1, min(len(s), i + 5 + 1)):
        t = "".join(s[i:j])
        if t not in ans:
            ans.append("".join(s[i:j]))
            ans = sorted(ans)[:5]
print(ans[k - 1])


### FIXED CODE ###

# 最小かつ最長はzzzzzなので各文字+4まで調べてみるか（27^5-1で全探索もできると思うがやり方がわからん
s = input()
k = int(input())
d = set()
for i in range(len(s)):
    for j in range(1, 6):
        if i + j <= len(s):
            d.add(s[i : i + j])
print(sorted(list(d))[k-1])
a,b,c,d = map(int, input().split())
if a==c:
    print(abs(b-d))
elif a>c:
    if a>d:
        print(0)
    elif a<d<b:
        print(abs(a-d))
    else:
        print(abs(a-b))
else:
    if c>b:
        print(0)
    elif c<b<d:
        print(abs(c-b))
    else:
        print(abs(c-d))

### FIXED CODE ###

x = input()
if x[0] == x[2]:
    print('Yes')
else:
    print('No')
s = input()
S = input()
flag = False
for i in range(len(s)-len(S)+1):
    if s[i] == S[0] or s[i] == "?":
        a = s[i:i+len(S)]
        for j in range(len(S)):
            if a[j] == S[j] or a[j] == "?":
                continue
            break
        else:
            flag = True
            s = s[0:i]+S+s[i+len(S):-1]
print(s.replace("?","a") if flag == True else "UNRESTORABLE")

### FIXED CODE ###

s = input()
S = input()
flag = False
ans = []
for i in range(len(s)-len(S)+1):
    if s[i] == S[0] or s[i] == "?":
        a = s[i:i+len(S)]
        for j in range(len(S)):
            if a[j] == S[j] or a[j] == "?":
                continue
            break
        else:
            flag = True
            ans.append(s[:i]+S+s[i+len(S):])
if not flag:
    print("UNRESTORABLE")
    exit()
for i in range(len(ans)):
    ans[i] = ans[i].replace("?","a")
ans.sort()
print(ans[0])
k = int(input())

r_num = list(range(1,10))
for i in range(3):
    for j in range(len(r_num)):
        for m in range(10):
            if abs(r_num[j]%10-m) <= 1:
                new = r_num[j] * 10 + m
                r_num.append(new)
print(r_num[k-1])

### FIXED CODE ###

k = int(input())
lis = [1,2,3,4,5,6,7,8,9]

i = 0
while i<9:
    X = []
    for L in lis:
        if i == 0 or L >= 10**i:
            s = str(L)
            if s[-1] == "0":
                X.append(10*L)
                X.append(10*L+1)
            elif s[-1] == "9":
                X.append(10*L+8)
                X.append(10*L+9)
            else:
                X.append(10*L+int(s[-1])-1)
                X.append(10*L+int(s[-1]))
                X.append(10*L+int(s[-1])+1)
    for x in X:
        lis.append(x)
    i += 1
print(lis[k-1])
N = int(input())

p = list()

p = map(int, input().split())

k = 0

for i,number in enumerate(p):
  if (number > p[ i + 1 ]):
    k += 1

if ( k <= 1 ):
  print("YES")
else:
  print("NO")
  

### FIXED CODE ###

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

num_sort = sorted(num)
ans = 0

for i in range(N):
  if num[i] == num_sort[i]:
    continue
  else:
    ans += 1
    
if ans <= 2:
  print("YES")
else:
  print("NO")
_fib = [1, 1]

def fib(n):
    if len(_fib) > n:
        return _fib[n]
    else:
        _fib[n] = fib[n-1] + fib[n-2]
        return _fib[n]

_n = int(raw_input())
print(fib(_n))

### FIXED CODE ###

_fib = [None] * 45
_fib[0] = 1
_fib[1] = 1

def fib(n):
    if _fib[n] is None:
        _fib[n] = fib(n-1) + fib(n-2)
    return _fib[n]

_n = int(raw_input())
print(fib(_n))