Harryxun/stf_run huggingface dataset:
# 16D8101022L 小林勇希 ID:k_mb python3

def GCD(x,y):

    if(x >= y):
        z = y
        w = x%y
    else:
        z = x
        w = y%x

    if(not(w == 0)):
        return GCD(z,w)
    else:
        print(z)
"""

    while(1):
        if(w != 0):
            v = w
            w = z%w
            z = v
        else:
            print(z)
            break
"""


a = int(input())
b = int(input())
GCD(a,b)


### FIXED CODE ###

def GCD(x,y):

    if(x >= y):
        z = y
        w = x%y
    else:
        z = x
        w = y%x

    if(not(w == 0)):
        return GCD(z,w)
    else:
        return z

A = [int(i) for i in input().split()]
print(GCD(A[0],A[1]))

"""実行結果

100 55
5



66 77
11

"""
N=int(input())
import ita
data=ita.array.make1d(N+1)
data[0]=2
data[1]=1
for i in range(2,N+1):
    data[i]=data[i-1]+data[i-2]
print(data[N])   

### FIXED CODE ###

#79B
N=int(input())
data=[2]
data.append(1)
for i in range(2,N+1):
    data.append(data[i-1]+data[i-2])
    
print(data[N])
r = int(input())
r = "AGC"
if r < 1200:
    ans = "ABC"
else r < 2800:
    ans = "ARC"
print(ans)

### FIXED CODE ###

r = int(input())
ans = "AGC"
if r < 1200:
    ans = "ABC"
elif r < 2800:
    ans = "ARC"
print(ans)
a, b, c, k = map(int, input().split())

sums = 0

alist = [1] * a
blist = [0] * b
clist = [-1] * c

ll = alist + blist + clist

print(sum(ll[0:k]))

### FIXED CODE ###

import sys

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

sums = 0

if (k <= a):
    print(k)
    sys.exit()
else:
    sums += a
    k -= a

if (k <= b):
    print(sums)
    sys.exit()
else:
    k -= b

sums += -1 * k
print(sums)
def dfs(i, total, S, remain):
    global ans
    if i == D:
        if S < G:
           """
           If all the problems of the segment don't have to be calculated,
           it is preferable to solve some of the segment with the highest rate.
           """
           use = max(remain)
           N = min(L[use-1][0], (G-S)//(100*L[use-1][0]))
           S += 100 * N * use
           total += N
           
        if S >= G:
           ans = min(ans, total)
    else:
        dfs(i+1, total, S, remain)
        dfs(i+1, total + L[i+1][0], S + 100 * (i+1) * L[i+1][0] + L[i+1][1], remain - (i+1))

D, G = map(int, input().split())
L = [list(map(int, input().split())) for _ in range(D)]
ans = 10 ** 9

dfs(0, 0, 0, set(range(1, D+1)))

print(ans)

### FIXED CODE ###

# まだ解いてない配点を nokori として持つ
def dfs(i, sum, count, nokori):
    global ans
    if i == d:
        # G 点に満たなければ nokori のうち一番大きいものを解く
        if sum < g:
            use = max(nokori)
            # 解く問題が問題数を超えないように注意
            n = min(pc[use - 1][0], -(-(g - sum) // (use * 100)))
            count += n
            sum += n * use * 100

        if sum >= g:
            ans = min(ans, count)
    else:
        # 総合スコア、解いた問題数、まだ解いてない問題を更新
        dfs(i + 1, sum, count, nokori)
        dfs(i + 1, sum + pc[i][0] * (i + 1) * 100 + pc[i][1], count + pc[i][0], nokori - {i + 1})


d, g = map(int, input().split())
pc = [list(map(int, input().split())) for i in range(d)]

ans = float("inf")

dfs(0, 0, 0, set(range(1, d + 1)))
print(ans)
I = list(map(int,input().split()))
N = I[0]
M = I[1]
A = list(map(int,input().split()))

for i in range(M):
    num = index(max(A))
    A[num] = A[num] / 2

A = map(int,A)
ans = sum(A)
print(ans)

### FIXED CODE ###

import heapq
import math
I = list(map(int,input().split()))
N = I[0]
M = I[1]
A = list(map(lambda x:-x,map(int,input().split())))
heapq.heapify(A)
for i in range(M):
    num = heapq.heappop(A)
    num = math.ceil(num / 2)
    heapq.heappush(A,num)

print(-sum(A))
mod = 998244353

def comb(n, r):
    if 2 * r > n: return comb(n, n-r)
    return fac[n] * inv[r] * inv[n-r] % mod

n, a, b, k = map(int, input().split())

n_max = 3*10**5
fac = [1] * (n_max+2)
inv = [1] * (n_max+2)
for i in range(2, n+1):
    fac[i] = fac[i-1] * i % mod
inv[n] = pow(fac[n], mod - 2, mod)
for i in range(n-1, 1, -1):
    inv[i] = inv[i + 1] * (i + 1) % mod

ans = 0
for i in range(n+1):
    if (k-a*i) >= 0 and (k-a*i)%b == 0 :
      j = (k-a*i)//b 
      ans += comb(n, i) * comb(n, j) % mod

print(ans)

### FIXED CODE ###

mod = 998244353

def comb(n, r):
    if 2 * r > n: return comb(n, n-r)
    return fac[n] * inv[r] * inv[n-r] % mod

n, a, b, k = map(int, input().split())

fac = [1] * (n+2)
inv = [1] * (n+2)
for i in range(2, n+1):
    fac[i] = fac[i-1] * i % mod
inv[n] = pow(fac[n], mod - 2, mod)
for i in range(n-1, 1, -1):
    inv[i] = inv[i + 1] * (i + 1) % mod

ans = 0
for i in range(n+1):
    Num = (k-a*i)
    if (0 <= Num//b) and (Num//b <= n) and (Num%b == 0):
      j = Num//b 
      ans += comb(n, i) * comb(n, j) 
print(ans%mod)
# 解法 累積和とdfsを使うと探索が減ってなんかうまくいく．
N,Q = map(int,input().split())
E=[[] for _ in range(N)]
for _ in range(N-1):
    a,b = map(int,input().split())
    E[a-1].append(b)
    E[b-1].append(a)
dic = {}
for _ in range(Q):
    p,x = map(int,input().split())
    if not p-1 in dic:
        dic[p-1] = x
        continue
    dic[p-1] += x

res = [0 for _ in range(N)]
def dfs(p,s,ans):
    global res
    # 終わり条件　最後まで行ったら，つまりE[k] = []になったら.
    # 再帰 累積和を計算して，自分がつながっているノードに接続している
    if s-1 in dic:
        ans += dic[s-1]

    res[s-1] = str(ans)
    if E[s-1] == [p]:
        return
    for e in E[s-1]:
        if e == p:
            continue
        dfs(s,e,ans)
dfs(1,1,0)
print(' '.join(res))





### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
# 解法 累積和とdfsを使うと探索が減ってなんかうまくいく．
N,Q = map(int,input().split())
E=[[] for _ in range(N)]
for _ in range(N-1):
    a,b = map(int,input().split())
    E[a-1].append(b)
    E[b-1].append(a)
dic = {}
for _ in range(Q):
    p,x = map(int,input().split())
    if not p-1 in dic:
        dic[p-1] = x
        continue
    dic[p-1] += x

res = [0 for _ in range(N)]
def dfs(p,s,ans):
    global res
    # 終わり条件　最後まで行ったら，つまりE[k] = []になったら.
    # 再帰 累積和を計算して，自分がつながっているノードに接続している
    if s-1 in dic:
        ans += dic[s-1]

    res[s-1] = str(ans)
    if E[s-1] == [p]:
        return
    for e in E[s-1]:
        if e == p:
            continue
        dfs(s,e,ans)
dfs(1,1,0)
print(' '.join(res))
from sys import stdin
N = int(stdin.readline().rstrip())
A = []
for i in range(N):
    A.append(int(input()))
    
B = A[:]
    
ans1 = 0

for j in range(N):
    ans1 += (A[j]//2)
    A[j] = (A[j]%2)
    
for k in range(1,N):
    ans1 += min(A[k-1],A[k])
    A[k] = A[k] - min(A[k-1],A[k])
    
ans2 = 0
tmp = min(B[0],B[1])

for l in range(1,N):
    ans2 += min(B[l-1],B[l])
    B[l] = B[l] - min(B[l-1],B[l])
    B[l-1] = B[l-1] - min(B[l-1],B[l])

B[0] -= tmp

for m in range(N):
    ans2 += (B[m]//2)

print(max(ans1,ans2))

### FIXED CODE ###

from sys import stdin
N = int(stdin.readline().rstrip())
A = []
for i in range(N):
    A.append(int(input()))
    
ans = 0
for i in range(N-1):
    ans += (A[i]//2)
    A[i+1] -= min(A[i+1],A[i]%2)
    ans += min(A[i+1],A[i]%2)
ans += (A[-1]//2)
print(ans)
import fractions

N = int(input())
ints = list(map(int, input().split())).sort()

gcd = 0
result = 1
holed_ints = []
for i in range(len(ints)):
    holed_ints = ints[:i] + ints[i+1:]
    gcd = 0
    for j in range(len(holed_ints)):
        gcd = fractions.gcd(gcd, holed_ints[j])
        if gcd == 1:
            break
    if gcd > result:
        result = gcd

print(result)

### FIXED CODE ###

import fractions

integral_count = int(input())
blackboard_integers = list(map(int, input().split()))

gcd_integers = list(set(blackboard_integers))

gcd = 0
result = 1
for i in range(len(gcd_integers)):
    gcd = 0
    if blackboard_integers.count(gcd_integers[i]) >= 2:
        for n in gcd_integers:
            gcd = fractions.gcd(gcd, n)
    else:
        for n in gcd_integers[:i]:
            gcd = fractions.gcd(gcd, n)
        for n in gcd_integers[i+1:]:
            gcd = fractions.gcd(gcd, n)
    if gcd > result:
        result = gcd

print(result)
import numpy as np
import pandas as pd

#N=int(input())
#S=input()
S_list = pd.Series([x for x in S])
r = sum(S_list == "R")
g = sum(S_list == "G")
b = sum(S_list == "B")
 
ans = r * g * b
 
for i in range(N):
  for k in [N - k_ - 1 for k_ in range(N)]:
    tar_j = i + k
    if (tar_j > 2 * i) & (tar_j < 2 * k):
      if np.mod(tar_j, 2) == 0:
        j = int(tar_j / 2)
        s = S[i] + S[j] + S[k]
        if ("R" in s) & ("G" in s) & ("B" in s):
          ans -= 1
    else:
      break
print(ans)


### FIXED CODE ###


#S = "RBRBGRBGGBBRRGBBRRRBGGBRBGBRBGBRBBBGBBB"# * 1000
#N = len(S)

N=int(input())
S=input()
r = len(S.replace("G", "").replace("B", ""))
g = len(S.replace("R", "").replace("B", ""))
b = N - r - g
 
ans = r * g * b
 
is_break = False
for i in range(N):
    for j in range(i, int((N+i)/2 + 1)):
        k = 2 * j - i
        if k < N:
            s = S[i] + S[j] + S[k]
            if ("R" in s) & ("G" in s) & ("B" in s):
                    ans -= 1

print(ans)
n, m, k = map(int, input().split())
z = 998244353
if n <= k+1:
    a = 1
    for i in range(n):
        a = a*m%z
    print(a)
else:
    d = m
    for i in range(n-1):
        d = d*(m-1)%z
    a = [d]
    b = [1]
    c = 0
    for i in range(1, int((n-1)/2)+1):
        b.append(int(b[-1]*(n-i)/i)%z)
    for i in range(int(n/2)):
        b.append(b[int(n/2)-i-1])
    for i in range(1, k+1):
        a.append(int(a[-1]*b[i]/b[i-1]/(m-1))%z)
    for i in range(k+1):
        c = (c+a[i])%z
    print(c)

### FIXED CODE ###

n, m, k = map(int, input().split())
z = 998244353
if n <= k+1:
    a = 1
    for i in range(n):
        a = a*m%z
    print(a)
else:
    a = []
    b = []
    d = [1, 1]
    e = [1, 1]
    f = [0, 1]
    for i in range(2, n):
        d.append(d[-1]*i%z)
        f.append((-f[z%i]*(z//i))%z)
        e.append(e[-1]*f[-1]%z)
    for i in range(k+1):
        b.append(d[n-1]*e[i]*e[n-i-1]%z)
    x = 0
    g = [1]
    for i in range(n-1):
        g.append(g[i]*(m-1)%z)
    for i in range(k+1):
        a.append(b[i]*m*g[n-i-1]%z)
    for i in range(k+1):
        x = (x+a[i])%z
    print(x)
n,k = map(int,input().split())
l = [1,1]
for i in range(2,2000):
    l.append(l[i-1]*i)
def f(i):
    global n,k,l
    if i == 1:
        return n-k+1
    else:
        tiri = l[k-1]//l[i-1]*l[k-i]
        aka = n - k
        aka = aka - i + 1
        akatiri = l[i + aka ] // (l[aka] * l[i])
        #print(tiri,akatiri)
        return tiri * akatiri
for i in range(1,k+1):
    print(f(i)%(10**9 + 7))


### FIXED CODE ###

n,k = map(int,input().split())
l = [1,1]
for i in range(2,2000):
    l.append(l[i-1]*i)
def f(i):
    global n,k,l
    if i == 1:
        return n-k+1
    elif i - 1 > n - k :
        return 0
    else:
        tiri = l[k-1]//(l[i-1]*l[k-i])
        aka = n - k
        aka = aka - i + 1
        akatiri = l[i + aka ] // (l[aka] * l[i])
        #print(tiri,akatiri)
        return tiri * akatiri
for i in range(1,k+1):
    print(f(i)%(10**9 + 7))
n = input()
a = [input() for i in range(10)]
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i

### FIXED CODE ###

import sys

a = []
for line in sys.stdin:
    a.append(int(line))
b = [0, 0, 0]
for i in a:
	j = 0
	while j < 3:
		if i > b[j]:
			b.insert(j, i)
			break
		j += 1

for i in b[:3]:
	print i
import math

# 最大公約数を求める問題
N, X = map(int, input().split())
x = [int(_) for _ in input().split()]
if N == 1:
    print(abs(x[0]-X))
    exit()

x.sort()
# N >= 1と仮定
for i in range(N-1):
    if x[i] <= X and x[i+1] > X:
        x = x[:i+1] + [X] + x[i+1:]
        break

base = math.gcd(x[1]-x[0], x[2]-x[1])
for i in range(2, N):
    diff = x[i+1] - x[i]
    base = math.gcd(base, diff)
print(base)


### FIXED CODE ###

import math

# 最大公約数を求める問題
N, X = map(int, input().split())
x = [int(_) for _ in input().split()]
if N == 1:
    print(abs(x[0]-X))
    exit()

x.sort()
# N > 1と仮定
for i in range(N-1):
    if x[i] < X and x[i+1] > X:
        x = x[:i+1] + [X] + x[i+1:]
        break
    elif x[i] >= X:
        x = [X] + x
        break
    elif x[i+1] <= X:
        x = x + [X]
        break

if len(x) >= 3:
    base = math.gcd(x[1]-x[0], x[2]-x[1])
    for i in range(2, N):
        diff = x[i+1] - x[i]
        base = math.gcd(base, diff)
    print(base)
else:
    print(x[1] - x[0])
# N問出題
# M回提出
N, M = map(int, input().split())

AC = []
WC = []
ansAC
ansRC

for i in range(0, M):
    AC[i] = False
    WA[i] = 0

for m in range(0, M):
    p, s = input().split()
    # 正解
    if s == "AC" and int(p) <= N:
        AC[p] = True
        ansAC +=1
        ansWC += WA[p]
    # WAかつ未正解
    elif s == "WA" and (p not in ans):
        WA[p] +=1
    else:
        continue

print(len(set(ans)), pena)

### FIXED CODE ###

import sys
from collections import defaultdict

n, m = map(int, input().split())
ac = 0
# 初期化
wa = defaultdict(lambda: 0)
already = set()
for line in sys.stdin:
    p, s = line.strip().split()
    p = int(p)
    # すでに正解していたらスキップ
    if p in already:
        continue
    # 初正解ならAC+1, 失敗回数を追加
    if s == 'AC':
        ac += 1
        already.add(p)
    # 失敗なら失敗回数を増やす
    else:
        wa[p] += 1

print(ac, sum(wa[i] for i in already))
def update_score_dfs(target):
    global graph, visited, scores
    visited[target] = 1
    for node, score in graph[target].items():
        if scores[target] + score > scores[node]:
            scores[node] = scores[target] + score
    for nextnode in graph[target].keys():
        if visited[nextnode] == 1:
            break
        update_score_dfs(nextnode)

n, m = map(int, raw_input().split())
graph = {}
visited = {}
# 0: not visited, 1: visited
scores = {}
for i in range(n):
    visited[i + 1] = 0
    scores[i + 1] = -float('inf')

for i in range(n):
    graph[i+1] = {}

for i in range(m):
    a, b, c = map(int, raw_input().split())
    graph[a][b] = c
    # {1: {2: 4, 3: 5}, 2: {3: 4}}

visited[n] = 1
target = 1
for node, score in graph[target].items():
    scores[node] = score
     
update_score_dfs(target)
print scores[n]


### FIXED CODE ###

n, m = map(int, raw_input().split())
graph = {}
visited = {}
# 0: not visited, 1: visited
scores = {}
for i in range(n):
    if i == 0:
        scores[i+1] = 0
    else:
        scores[i+1] = float("inf")
    graph[i+1] = {}

for i in range(m):
    a, b, c = map(int, raw_input().split())
    graph[a][b] = -c
    # {1: {2: 4, 3: 5}, 2: {3: 4}}

for i in range(n):
    for v in graph.keys():
        for e in graph[v].keys():
            if scores[e] > scores[v] + graph[v][e]:
                scores[e] = scores[v] + graph[v][e]

ans = -scores[n]
negative = {}
for i in range(n):
    negative[i+1] = False

for i in range(n+1):
    if negative[n]:
        break
    for v in graph.keys():
        for e in graph[v].keys():
            if scores[v] + graph[v][e] < scores[e]:
                scores[e] = scores[v] + graph[v][e]
                negative[e] = True
                if negative[v]:
                    negative[e] = True

if negative[n]:
    print 'inf'
else:
    print ans
s = int(input())
if s == 'ABC':
    print('ARC')
else:
    print('ABC')

### FIXED CODE ###

s = input()
if s == 'ABC':
    print('ARC')
else:
    print('ABC')
from operator import itemgetter
N , M = map(int, input().split(' '))

city = []
for i in range(M):
    lscity = list(map(int, input().split(' ')))
    city.append([*lscity, i])

city_y = sorted(city, key = itemgetter(1))
city_num = [0 for _ in range(N+1)]
city_ID = {}

for i in range(M):
    city_num[city_y[i][0]] += 1
    city_ID[city_y[i][2]] = ("{:06d}{:06d}".format(city_y[i][0], city_num[city_y[i][0]]))

for i, j in sorted(city_ID.items()):
    print(j)

### FIXED CODE ###

from operator import itemgetter
N , M = map(int, input().split(' '))

city = []
for i in range(M):
    a, b = map(int, input().split(' '))
    city.append([a, b, i])

city_y = sorted(city, key = itemgetter(1))
city_num = [0 for _ in range(N+1)]
city_ID = {}

for i in range(M):
    city_num[city_y[i][0]] += 1
    city_ID[city_y[i][2]] = ("{:0=6}{:0=6}".format(city_y[i][0], city_num[city_y[i][0]]))

for i, j in sorted(city_ID.items()):
    print(j)
S = input()
K = int(input())

if S[K - 1] == '1':
    print(S[K - 1])

for c in S:
    if c != '1':
        print(c)
        quit()


### FIXED CODE ###

S = input()
K = int(input())

for i, c in enumerate(S):
    if i >= K:
        print(1)
        quit()
    elif c != '1':
        print(c)
        quit()
print(1)
quit()
def main():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))

    towns = [1]
    i = 0
    while a[i] not in towns:
        towns.append(a[i])
        i = a[i] - 1
    ti = towns.index(a[i]) + 1
    if ti > k:
        print(towns[ti - 1])
    else:
        print(towns[(k - ti)%(len(towns) - ti) + ti])

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys

def main():
    n, k = map(int, sys.stdin.buffer.readline().split())
    a = [0] + list(map(int, sys.stdin.buffer.readline().split()))

    visited = [0]*(n+1)
    town = 1
    for i in range(1, k+1):
        town = a[town]
        if visited[town] == 0:
            visited[town] = i
        else:
            cyc = (k - visited[town])%(i - visited[town]) + visited[town]
            print(visited.index(cyc))
            exit()
    print(town)

if __name__ == "__main__":
    main()
import sys
import math
import itertools
import random
n=int(input())
lis=[0]*(10**5)
for a in range(1,int((math.sqrt(n)/2)+100)):
    for b in range(1,int((math.sqrt(n)/2)+100)):
        for c in range(1,int((math.sqrt(n)/2)+100)):
            lis[int(a**2+b**2+c**2+a*b+b*c+c*a)]+=1
for i in range(n):
    print(lis[i])

### FIXED CODE ###

import sys
import math
import itertools
import random
n=int(input())
lis=[0]*(10**8)
for a in range(1,int((math.sqrt(n)/2)+100)):
    for b in range(1,int((math.sqrt(n)/2)+100)):
        for c in range(1,int((math.sqrt(n)/2)+100)):
            lis[int(a**2+b**2+c**2+a*b+b*c+c*a)]+=1
for i in range(1,n+1):
    print(lis[i])
a, b = input().split()
lis = list(map(int, input().split()))
print(int(a) - sum(lis) if int(a)>sum(lis) else "-1")

### FIXED CODE ###

print(2*3.141592653589793238*int(input()))
N = input()

n = int(N)
sn = sum(list(N))

print('Yes') if n % sn == 0 else print('No')

### FIXED CODE ###

N = input()

n = int(N)
sn = sum(list(map(int, list(N))))

print('Yes' if n % sn == 0 else 'No')
from itertools import chain

H,W = map(int,input().split())

A = tuple(tuple(map(int,input().split())) for _ in range(H))
B = tuple(tuple(map(int,input().split())) for _ in range(H))

dp = {(0,0) : {(A[0][0]-B[0][0])%160, (B[0][0]-A[0][0])%160}}


for t in range(1,H+W-1):
    ndp = dict()
    for x in range(max(0,t-H+1), min(t+1,W)):
        y = t-x
        d = A[y][x]-B[y][x]
        if x > 0 and y > 0:
            ns = set(k%160 for k in chain((v+d for v in dp[(x-1,y)]),
                            (v-d for v in dp[(x-1,y)]),
                            (v+d for v in dp[(x,y-1)]),
                            (v-d for v in dp[(x,y-1)]),))
        elif x > 0:
            ns = set(k%160 for k in chain((v+d for v in dp[(x-1,y)]),
                            (v-d for v in dp[(x-1,y)]),))
        elif y > 0:
            ns = set(k%160 for k in chain((v+d for v in dp[(x,y-1)]),
                            (v-d for v in dp[(x,y-1)]),))
        else:
            ns = set()

        ndp[(x,y)] = ns
    dp = ndp

print(min(dp[(W-1,H-1)], (160-v for v in dp[(W-1,H-1)] ))


### FIXED CODE ###

import numpy as np

H,W = map(int,input().split())

A = np.array(tuple(tuple(map(int,input().split())) for _ in range(H)))
B = np.array(tuple(tuple(map(int,input().split())) for _ in range(H)))

D = np.abs(A-B)
del A,B

if W > H:
    W,H = H,W
    D = D.T

L = D.max()*(H+W-1)+1
dp0 = np.zeros((W,L), dtype=bool)
dp1 = np.zeros_like(dp0)

dp1[0,D[0,0]] = True
for y in range(H):
    for x in range(W):
        d = D[y,x]

        dp1[x,d:] |= dp0[x,:L-d]
        dp1[x,:L-d] |= dp0[x,d:]
        dp1[x,:d] |= dp0[x,d:0:-1]
        dp1[x,d:] |= dp1[x-1,:L-d]
        dp1[x,:L-d] |= dp1[x-1,d:]
        dp1[x,:d] |= dp1[x-1,d:0:-1]
    dp0,dp1 = dp1, np.zeros_like(dp1)

print(min(i for i,v in enumerate(dp0[-1]) if v))
import functools
@lru_cache(maxsize=None)

def luca(n):
    if n==0:
        return 2
    elif n == 1:
        return 1
    else:
        return luca(n-1)+luca(n-2)

N = int(input())

print(luca(N))


### FIXED CODE ###

from functools import lru_cache
@lru_cache(maxsize=None)

def luca(n):
    if n==0:
        return 2
    elif n == 1:
        return 1
    else:
        return luca(n-1)+luca(n-2)

N = int(input())

print(luca(N))
from sys import stdin

N, K = [int(i) for i in stdin.readline().rstrip().split()]
x = [int(i) for i in stdin.readline().rstrip().split()]

if N == 1:
    print(x[0])
else:
    ans = min((abs(x[0]) + abs(x[K - 1] - x[0])),
              (abs(x[K - 1]) + abs(x[0] - x[K - 1])))

    for i in range(1, len(x) - K):
        tmp = min((abs(x[i]) + abs(x[i + K - 1] - x[i])),
                  (abs(x[i + K - 1]) + abs(x[i] - x[i + K - 1])))
    if tmp < ans:
        ans = tmp

    print(ans)


### FIXED CODE ###

from sys import stdin

N, K = [int(i) for i in stdin.readline().rstrip().split()]
x = [int(i) for i in stdin.readline().rstrip().split()]

ans = min((abs(x[0]) + abs(x[K - 1] - x[0])),
          (abs(x[K - 1]) + abs(x[0] - x[K - 1])))

for i in range(1, len(x) - K + 1):
    left = i
    right = i + K - 1

    letf_to_right = abs(x[left]) + abs(x[right] - x[left])
    right_to_left = abs(x[right]) + abs(x[left] - x[right])

    tmp = min(letf_to_right, right_to_left)

    if tmp < ans:
        ans = tmp

print(ans)
import datetime as dt

_data = input()

if 0 <= _date <86400:
    n = dt.datetime.formtimestamp(_date)
    print n.minute + ":" + n.second + ":" + n.microsecond

### FIXED CODE ###

input = int(input())
if 0 <= input < 86400:
    hour = input / 3600
    minute = (input / 60) % 60
    second = input % 60
    print("%d:%d:%d" % (hour,minute,second))
# -*- coding: utf-8 -*-
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

def main():
    K = int(input())
    # = "7"*999982
    #print(int(t)%999983)

    if K%2 == 0 or K%5 == 0:
        print(-1)
    else:
        f = len(factorization(K))
        i = 0
        while(20000>i):
            i+=1
            if 7 * (10**i-1)//9 %K == 0:
                print(i)
                return
        if f > 2:
            print(-1)
        else:
            print(K-1)

if __name__ == "__main__":
    main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
N = int(input())
if N >= 30:
    print("Yes")
else:
    print("No")
n = int(input())
a = list(map(lambda x: int(x), input().split()))
b = list(map(lambda x: int(x), input().split()))
c = list(map(lambda x: int(x), input().split()))

point = 0
temp = n + 1

for i, num in enumerate(a):
    point += b[num - 1]
    if num == temp + 1:
        point += c[num - 1]
    temp = num

print(point)



### FIXED CODE ###

n = int(input())
a = list(map(lambda x: int(x), input().split()))
b = list(map(lambda x: int(x), input().split()))
c = list(map(lambda x: int(x), input().split()))

point = 0
temp = n + 1

for i, num in enumerate(a):
    point += b[num - 1]
    if num == temp + 1:
        point += c[num - 2]
    temp = num

print(point)
#codinf:UTF-8
s = input()
print(s.replace("2017","2018")

### FIXED CODE ###

#codinf:UTF-8
s = input()
print(s.replace("2017","2018"))
A,B = list(map(int,input()))
print((A+B-1)//A)

### FIXED CODE ###

A,B = list(map(int,input().split()))
ans = 1
i = 0
while ans < B:
  ans += A-1
  i +=1
print(i)
x,k,d=map(int,input().split())
for i in range(k-1):
    if x>0:
        x-=d
        if x<=0:
            flag=-1
            break
    elif x<0:
        x+=d
        if x>=0:
            flag=1
            break
    else:
        flag=0
        break
if flag==0:
    print(0)
elif flag==-1:
    print(min(abs(x),x+d))
else:
    print(min(abs(x-d),x))

### FIXED CODE ###

x,k,d=map(int,input().split())
x=abs(x)
if x>0:
    temp=x//d
    if temp>=k:
        print(x-k*d)
    else:
        if (k-temp)%2==0:
            print(x%d)
        else:
            print(abs(x%d-d))
elif x==0:
    if k%2==0:
        print(0)
    else:
        print(d)