Harryxun/stf_run huggingface dataset:
a,b,c = map( int , raw_input().split() )
n = 0

for i in range( a , b+1 ):
  if c % i == 0
    n = n + 1
print 'n'

### FIXED CODE ###

a,b,c = map( int , raw_input().split() )
n = 0

for i in range( a , b+1 ):
  if c % i == 0:
    n = n + 1
print n
#第二問　make a rectangle
import collections
n=int(input())
lists=list(map(int,input().split()))
A=dict(collections.Counter(lists))
dictdict=[]


for j in A.keys():
    for _ in range(A[j]//2):
        dictdict.append(j)

dictdict=sorted(dictdict,reverse=True)
print(dictdict[0]*dictdict[1])


### FIXED CODE ###

#第二問　make a rectangle
import collections
n=int(input())
lists=list(map(int,input().split()))
A=dict(collections.Counter(lists))
dictdict=[]


for j in A.keys():
    for _ in range(A[j]//2):
        dictdict.append(j)

dictdict=sorted(dictdict,reverse=True)
if len(dictdict)>=2:
    print(dictdict[0]*dictdict[1])
else:
    print(0)
n,d=map(int,input().split())

l=[]
for _ in range(n):
  l1=[map(int,input().split())]
  l.append(l1)

import math

ans=[]
for a in range(n):
  for b in range(n):
    x=0
    for c in range(d):
      D=(l[a][c]-l[b][c])**2
      x+=D
    y=math.sqrt(x)
    ans.append(isinstance(y,int))
      
ans=(ans.count(True)-n)//2
print(ans)

### FIXED CODE ###

n,d=map(int,input().split())

l=[]
for _ in range(n):
  l1=list(map(int,input().split()))
  l.append(l1)

import math

ans=[]
for a in range(n):
  for b in range(n):
    x=0
    for c in range(d):
      D=(l[a][c]-l[b][c])**2
      x+=D
    y=math.sqrt(x)
    ans.append(y.is_integer())
      
ans=(ans.count(True)-n)//2
print(ans)
import collections

N = int(input())

q = collections.deque([(1, 0)])
v = {1}

while len(q) > 0:
    c, p = deque.popleft()
    v.add(c)
    if c == 0:
        break

    n1, n10 = (c + 1) % N, (c * 10) % n
    if not n1 in v:
        q.append((n1, p + 1))
    if not n10 in v:
        q.appendleft((n10, p))

print(p + 1)


### FIXED CODE ###

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

import collections

n = int(input())

cursor = 1
deque = collections.deque([(cursor, 0)])
visited = {cursor}

min_path = 10e10
while len(deque) > 0:
    cursor, min_path = deque.popleft()
    visited.add(cursor)
    if cursor == 0:
        break

    pone, mten = (cursor + 1) % n, (cursor * 10) % n
    if not pone in visited:
        deque.append((pone, min_path + 1))
    if not mten in visited:
        deque.appendleft((mten, min_path))

print(min_path + 1)
n=int(input())
p=list(map(int,input().split()))
ans=0
p_max=n+1
for i in range(n):
    if p[i]<p_min:
        ans+=1
        p_min=p[i]
print(ans)

### FIXED CODE ###

n=int(input())
p=list(map(int,input().split()))
ans=0
p_min=n+1
for i in range(n):
    if p[i]<p_min:
        ans+=1
        p_min=p[i]
print(ans)
import re
N=int(input())
listA=[input() for i in range(N)]

firstB=0
endA=0
feAB=0
AB=0
for i in listA:
    AB+=len(re.findall("AB",i))
    print(len(re.findall("AB",i)))
    if i[0]=="B":
        firstB+=1
    if i[-1]=="A":
        endA+=1
        if i[0]=="B":
            feAB+=1
AB+=min([endA,firstB])
print(AB)


### FIXED CODE ###

N,K=(int(i) for i in input().split())
print(N-K+1)
w,a,b=map(int, input().split())
print(min(abs(a+w-b)),abs(a-b-w))

### FIXED CODE ###

w,a,b=map(int, input().split())
if a<=b:
    print(max(0,(b-a-w)))
if b<a:
    print(max(0,(a-b-w)))
import itertools
import numpy as np 
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
acc = list(itertools.accumulate(a))
bcc = list(itertools.accumulate(b))

acc = np.array(acc)
#print(acc)
bcc = np.array(bcc)

checkA = np.where(acc <= k)
chA = checkA[0]
checkB = np.where(bcc <= k)
chB = checkB[0]

if (len(chA) > len(chB)):
  a1 = chA
  b1 = chB
else:
  a1 = chB
  b1 = chA

if (len(a1) == 0):
  print(0)
  exit()

ans = 0

for i in range(len(a1) -1, -1, -1):
  #print(i, acc[a1[i]])
  rest = k - acc[a1[i]]
  tar = np.where(bcc <= rest)
  if (len(tar[0]) == 0):
    num = 0
  else:
    num = tar[0][-1]

  #print('num', num)
  ans = max(num + i + 2, ans)
    

print(ans)

### FIXED CODE ###

import itertools
import numpy as np 
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# -------------------
n, m, k = map(int, readline().split())
#print(n)
a = list(map(int, readline().split()))
b = list(map(int, readline().split()))
a = [0] + a
b = [0] + b
acc = list(itertools.accumulate(a))
bcc = list(itertools.accumulate(b))

#acc = np.array(acc)
#print(acc)
#bcc = np.array(bcc)

ans = 0
j = m
for i, val in enumerate(acc):
  if (val > k):
    break
  else:
    rest = k - val
    #print(rest)
    #j = m
    #一ループ目がJの最大になるので、外側に置いてOK
    while (bcc[j] > rest):
      j -= 1

    ans = max(ans, j + i)


print(ans)
n = input()
v = np.array([int(x) for x in input().split()])
c = np.array([int(x) for x in input().split()])
profit = v -c
positive_profit = profit(profit > 0)
print(positive_profit.sum())

### FIXED CODE ###

import numpy as np
 
n = input()
v = np.array([int(x) for x in input().split()])
c = np.array([int(x) for x in input().split()])
 
profit = v - c
positive_profit = profit[profit > 0]
print(np.sum(positive_profit))
n, y = map(int, input().split())
z = y/1000
for i in range(1,n+1):
    for j in range(0, n+1-i):
        k = n - i- j
            if 10*i + 5*j + k == y:
                print('i j k')
                break
print('-1 -1 -1')

### FIXED CODE ###

n, y = map(int, input().split())
z = y/1000
for i in range(n+1):
    for j in range(n+1-i):
        k = n - i- j
        if 10*i + 5*j + k == z:
            print(i, j, k)
            exit(0)
print('-1 -1 -1')
#1行目を読み取る
line1 = input()
#スペースで区切る
splitLine1 = line1.split()

#それぞれをintに変換してn, kに代入する
#n, k = map(int, splitLine1)を分解
n = int(splitLine1[0])
k = int(splitLine1[1])

#2行目を読み取る
line2 = input()
#スペースで区切る
splitLine2 = line2.split()

#それぞれをintに変換してリストとして持つ
lengthList = []
for i in range(n):
  eachLengthNum = int(splitLine2[i])
  lengthList.append(eachLengthNum)

#lengthListを数字の小さい順にソートする
lengthList.sort()
#順番に取り出すために、大きい順に並べ替える
#reverseを使うと、listの順番をひっくり返す
lengthList.reverse()

#頭からkまでの数字を合計していく
resultLengthSum = 0
for i in range(k):
  resultLengthSum += l[i]

#答えを出力
print(resultLengthSum)

### FIXED CODE ###

n, k = map(int, input().split())
l = list(map(int, input().split()))
len = 0
l.sort()
l.reverse()

for i in range(k):
  len += l[i]

print(len)
a, b, c = map(int, input().split()))
cnt = 0
for i in range(a, b+1, 1):
    if(c % i == 0):
        cnt += 1
print(cnt)


### FIXED CODE ###

a, b, c = map(int, input().split())
cnt = 0
for i in range(a, b+1, 1):
    if(c % i == 0):
        cnt += 1
print(cnt)
import numpy as np

def solve(_list,_k):
  start = 0
  sum = -1
  for i in range(len(_l)-_k+1):
    s = np.sum(_l[i:i+_k])
    if sum < s:
      sum = s
      start = i

  ans = 0.
  for item in _l[start:start+_k]:
    upper = np.sum([j for j in range(item+1)])
    ans += upper / item

  return ans


if __name__ == "__main__":
  _n, _k = map(int, input().split())
  _l = [int(i) for i in input().split()]
  _l = np.array(_l)

  result = solve(_l, _k)
  print(result)


### FIXED CODE ###

def solve(_list,_k):
  accumulate_list = [0.]
  for i in _list:
    accumulate_list.append((i+1)/2 + accumulate_list[-1])

  ans = -1.0
  for i in range(len(accumulate_list)-_k):
    ans = max(ans, accumulate_list[i+_k]-accumulate_list[i])
  return ans

if __name__ == "__main__":
  _n, _k = map(int, input().split())
  _l = [int(i) for i in input().split()]

  result = solve(_l, _k)
  print(result)
seq=input()
c=0
for i in range(3):
  if seq[i]=1:
    c+=1
print(c)

### FIXED CODE ###

seq=input()
c=0
for i in range(3):
  if int(seq[i])==1:
    c+=1
print(c)
A, B, C D = map(int, input())
ans = 0
for i in range(A, B):
  if i % C == 0 and i % D == 0:
    ans = ans
  else:
    ans = ans + 1
print(ans)

### FIXED CODE ###

def bbb(x, y):
    return (x * y) // aaa(x, y)
 
 
def aaa(x, y):
    if x == 0:
        return y
    elif y == 0:
        return x
    else:
        return aaa(y, x % y)
 
 
a, b, c, d = map(int, input().split())
bc = b // c
bd = b // d
ac = (a-1) // c
ad = (a-1) // d
aw = (a-1) // bbb(c, d)
bw = b // bbb(c, d)
print((b - a + 1) - (bc - ac) - (bd - ad) + (bw - aw))
N = input()

if N % 2 == 0:
    print(0.5)
else:
    print((N//2+1)/N)

### FIXED CODE ###

N = int(input())

if N % 2 == 0:	
    print((N/2)/N)
else:
    print(((N+1)/2)/N)
str = raw_input()
q = input()
for ans in range(q):
    ans = raw_input()
    ans1 = ans.split(' ')
    if ans1[0] == 'replace':
        str = str[0:int(ans1[1])]+ans1[3]+ str[int(ans1[2])+1:len(str)]
    if ans1[0] == 'reverse':
        str = str[0:int(ans1[1])]+ans1[3]+ str[int(ans1[1]):int(ans1[2])+1][::-1] + str[int(ans1[2])+1:len(str)]
    if ans1[0] == 'print':
        print str[int(ans1[1]):int(ans1[2])+1]

### FIXED CODE ###

str = raw_input()
q = input()
for ans in range(q):
    ans = raw_input()
    ans1 = ans.split(' ')
    if ans1[0] == 'replace':
        str = str[0:int(ans1[1])]+ans1[3]+ str[int(ans1[2])+1:len(str)]
    if ans1[0] == 'reverse':
        str = str[0:int(ans1[1])]+ str[int(ans1[1]):int(ans1[2])+1][::-1] + str[int(ans1[2])+1:len(str)]
    if ans1[0] == 'print':
        print str[int(ans1[1]):int(ans1[2])+1]
n = int(input())
count = 0
ans = 0
for i in range(n):
  a,b = map(int, input().split())
  if  a == b:
    count += 1
  else:
    count = 0
  if count >= 3:
    ans = 1
    break
if ans = 1:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n = int(input())
count = 0
ans = 'No'
for i in range(n):
  a,b = map(int, input().split())
  if a == b:
    count += 1
  else:
    count = 0
  if count >= 3:
    ans = 'Yes'
    break
print(ans)
N, X, Y = list(map(int, input().split()))

# N = 5
# X = 2
# Y = 4

ans = [0]*N

for sv in range(N):
    # dist[v] = dist from sv to v
    dist = [float("inf")]*N
    last_visited = []
    dist[sv] = 0
    last_visited.append(sv)
    while last_visited:
        for v in last_visited:
            next_last_visited = []
            if v+1 < N and dist[v+1] == float("inf"):
                dist[v+1] = dist[v]+1
                next_last_visited.append(v+1)
            if v-1 >= 0 and dist[v-1] == float("inf"):
                dist[v-1] = dist[v]+1
                next_last_visited.append(v-1)
            if v == X-1 and dist[Y-1] == float("inf"):
                dist[Y-1] = dist[v]+1
                next_last_visited.append(Y-1)
            if v == Y-1 and dist[X-1] == float("inf"):
                dist[X-1] = dist[v]+1
                next_last_visited.append(X-1)
            # print(last_visited, next_last_visited)
            last_visited = next_last_visited
    for d in dist:
        ans[d] += 1

for a in ans[1:]:
    print(a//2)


### FIXED CODE ###


N, X, Y = list(map(int, input().split()))

# N = 2000
# X = 100
# Y = 1900


X -= 1
Y -= 1

# @profile


def main(N, X, Y):
    ans = [0]*N
    for i in range(N):
        for j in range(i+1, N):
            d = min(j-i, abs(X-i)+abs(Y-j)+1)
            ans[d] += 1

    for a in ans[1:]:
        print(a)


main(N, X, Y)
# -*- coding: utf-8 -*-
import sys

N, M = map(int, input().split())
a = [int(input()) for x in range(M)]

def calc_routes(dan):
    tmp = 1
    for i in range(int(dan/2)):
        i += 1
        n = dan - i
        tmp2 = 1
        for j in range(i):
            tmp2 *= n - j
        for j in range(i):
            tmp2 /= j + 1
        tmp += tmp2

    return tmp


for i in range(len(a)-1):
    if a[i+1] - a[i] == 1:
        print(0)
        sys.exit()

routes = 1
prev = 0
for x in a:
    x -= 1
    dan = x - prev
    routes *= calc_routes(dan)
    routes %= 1000000007
    prev = x+2

routes *= calc_routes(N-prev)
routes %= 1000000007
print(int(routes))

### FIXED CODE ###

# -*- coding: utf-8 -*-
from math import factorial

N, M = map(int, input().split())
a = [int(input()) for x in range(M)]

def fibo(dan):
    tmp = [1, 1]
    for i in range(2, dan+1):
        tmp.append(tmp[i-1] + tmp[i-2])
    return tmp[dan]

routes = 1
prev = 0
for x in a:
    if x == prev:
        routes = 0
        break
    else:
        dan = (x-1) - prev
        routes = (routes * fibo(dan))
        prev = x+1

routes = (routes * fibo(N-prev)) % 1000000007
print(int(routes))
X = int(input())
fh = x // 500
f = x - 2*fh // 5
pint(f+fh)

### FIXED CODE ###

x = int(input())
fh = x // 500
f = (x - (500*fh)) // 5
sum = f*5+fh*1000
print(sum)
N, K = map(int, input().split())
import math
def nCr(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
for j in range(K):
  if (2*j+1)>N:
    print(0)
  else:
    x = (nCr((K+j-2), j) * nCr(N-K+1, j+1)
    if x > 10**9+7:
         print(x%(10**9+7))
    else:
         print(x)
        

### FIXED CODE ###

N, K = map(int, input().split())
from operator import mul
from functools import reduce
 
def nCr(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under
 
for j in range(K):
  if (K+j)>N:
    print(0)
  else:
    x = (nCr((K-1), j) * nCr(N-K+1, j+1))
    if (x > (10**9+7)):
         print(x%(10**9+7))
    else:
         print(x)
n = int(input())
p = list(map(int, input().split()))  

ans = 0
for i in range(n):
    if p[i] == i+1:
        ans += 1
        if i != n:
            p[i+1] = 0

print(ans)

### FIXED CODE ###

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

ans = 0
for i in range(n):
    if p[i] == i+1:
        ans += 1
        if i != n-1:
            p[i+1] = 0


print(ans)
n=input()
cun=0
for i in n:
  if i=='1':
    con++
print(con)

### FIXED CODE ###

n = input()
cun = 0
for i in n:
    if i == '1':
        cun += 1
print(cun)
if n == 1 and m == 1:
    print(1)
if n != 1 and m == 1:
    print(m-2)
if n == 1 and m != 1:
    print(n-2)
if n != 1 and m != 1:
    print((n-2)*(m-2))

### FIXED CODE ###

n,m = map(int,input().split())

if n == 1 and m == 1:
    print(1)
if n != 1 and m == 1:
    print(n-2)
if n == 1 and m != 1:
    print(m-2)
if n != 1 and m != 1:
    print((n-2)*(m-2))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

n = int(readline())
xy = [list(map(int, readline().split())) for _ in range(n)]
dict = defaultdict(int)
for i, check in enumerate(xy):
    for dxy in xy[i + 1:]:
        y, x = check[0], check[1]
        dy, dx = dxy[0], dxy[1]
        dict[(y - dy, x - dx)] += 1
print(n - max(dict.values()))


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

n = int(readline())
xy = [tuple(map(int, readline().split())) for _ in range(n)]
dict = defaultdict(int)
dict[0] = 0
for i, check in enumerate(xy):
    for dxy in xy[i + 1:]:
        y, x = check[0], check[1]
        dy, dx = dxy[0], dxy[1]
        dict[(y - dy, x - dx)] += 1
        dict[(dy - y, dx - x)] += 1
print(n - max(dict.values()))
print(s[0][0]+s[1][0]+s[2][0])

### FIXED CODE ###

s = input().split()
print(s[0][0]+s[1][0]+s[2][0])
H, W = map(int, input().split())

if H*W%3 == 0:
    print(0)

else:
    M = Max(H, W)
    m = min(H, W)
    print(m*(M//2)-(M-M//2)*(m//2))

### FIXED CODE ###

h, w = map(int, input().split())
def choco(H, W):
    ans = float("inf")
    a, b, c = 0, 0, 0
    for i in range(1, H):
        a = i*W
        for j in range(2):
            if j == 0:
                b = (H-i)//2 * W
                c = H*W - a - b 
            else:
                b = (H-i)*(W//2)
                c = H*W - a - b
            ans = min(ans, max(a, b, c) - min(a, b, c))
    return ans

print(min(choco(h, w), choco(w, h)))
#!usr/bin/env pypy3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)


def main():
    a = list(input())
    print("No" if a.index("7") == -1 else "Yes")


main()


### FIXED CODE ###

#!usr/bin/env pypy3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)


def main():
    a = list(input())
    print("Yes" if "7" in a else "No")


main()
import sys
P = 0
N,M = map(int,input().strip().split())
if M == 0:
    print("{0} {1}".format(0,P))
    sys.exit()
ans_list = [list(input().strip().split()) for _ in range(M)]
result = [False] * N
for ans in ans_list:
    if int(ans[0]) <= N and result[int(ans[0])-1] != True
        if ans[1] == "WA":
            P += 1
        elif ans[1] == "AC":
            result[int(ans[0])-1] = True
print("{0} {1}".format(result.count(True),P))

### FIXED CODE ###

import sys
P = 0
N,M = map(int,input().strip().split())
if M == 0:
    print("{0} {1}".format(0,0))
    sys.exit()
ans_list = [list(input().strip().split()) for _ in range(M)]
result = [False] * N
wa_count = [0] * N
for ans in ans_list:
    if result[int(ans[0])-1] != True:
        if ans[1] == "WA":
            wa_count[int(ans[0])-1] += 1
        elif ans[1] == "AC":
            result[int(ans[0])-1] = True
for i in range(len(result)):
    if result[i] == True:
        P += wa_count[i]
print("{0} {1}".format(result.count(True),P))
a, b = map(int, input().split())
c = int((a + b) / 2)
print(c) if c == (a + b) else print(c + 1)

### FIXED CODE ###

r, g, b = input().split()
rgb = int(r + g + b)
result = rgb % 4

if result == 0:
    print("YES")
else :
    print("NO")
n,m=map(int, input().split())
r = []

for i in range(m):
    r.append(str(0))

for i in range(m):
    s,c = map(int, input().split())
    if r[s-1] != '0' and int(r[s-1]) < c:
        r[s-1] = r[s-1]
    else:
        r[s-1] = str(c)
    
if m == 1 and r[0] == '0':
    print(0)
elif r[0] == '0':
    print('-1')
else:
    print(''.join(r))



### FIXED CODE ###

n,m=map(int, input().split())
r = []

for i in range(n):
    r.append(str(0))

if n == 1 and m == 0:
    print('0')
    exit()
if n == 2 and m == 0:
    print('10')
    exit()
if n == 3 and m == 0:
    print('100')
    exit()

for i in range(m):
    s,c = map(int, input().split())
    if n == 1 and s == 1 and c == 0:
        print('0')
        exit()
    elif n > 1 and s == 1 and c == 0:
        print('-1')
        exit()

    if int(r[s-1]) == 0:
        r[s-1] = str(c)
    elif int(r[s-1]) == c:
        r[s-1] = str(c)
    else:
        print('-1')
        exit()

if n > 1 and r[0] == '0':
    r[0] = '1'
    print(''.join(r))
else:
    print(''.join(r))
n=int(input())
d=list(map(int,input().split())
hp=0
for i in range(n):
       for j in range(i+1,n):
           if i<j: 
               hp=hp+d[i]*d[j]
print(hp)


### FIXED CODE ###

n=int(input())
d=list(map(int,input().split()))
hp=0
for i in range(n-1):
       for j in range(i+1,n):
            hp=hp+d[i]*d[j]
print(hp)
x,y=map(int,input().split())

#a+b=x
#2a+4b=y
#2a=4x-y

if ((y-(2*x))%2==0)&(x-((y-(2*x))/2))>0 :
  print("Yes")
else:
  print("No")

### FIXED CODE ###

x,y=map(int,input().split())

if (y % 2 == 0) and (x * 2 <= y <= x * 4):
  print("Yes")
else:
  print("No")
print([2,1,3,4,7,11,18,29,47,76,123,199,322,521,843,1364,2207,3571,5778,9349,15127,24476,39603,64079,103682,167761,271443,439204,710647,1149851,1860498,3010349,4870847,7881196,12752043,20633239,33385282,54018521,87403803,141422324,228826127,370248451,599074578,969323029,1568397607,2537720636,4106118243,6643838879,10749957122,17393796001,28143753123,45537549124,73681302247,119218851371,192900153618,312119004989,505019158607,817138163596,1322157322203,2139295485799,3461452808002,5600748293801,9062201101803,14662949395604,23725150497407,38388099893011,62113250390418,100501350283429,162614600673847,263115950957276,425730551631123,688846502588399,1114577054219522,1803423556807921,2918000611027443,4721424167835364,7639424778862807,12360848946698171,20000273725560978,32361122672259149,52361396397820127,84722519070079276,137083915467899403,221806434537978679,358890350005878082,580696784543856761][int(input())])

### FIXED CODE ###

print([2,1,3,4,7,11,18,29,47,76,123,199,322,521,843,1364,2207,3571,5778,9349,15127,24476,39603,64079,103682,167761,271443,439204,710647,1149851,1860498,3010349,4870847,7881196,12752043,20633239,33385282,54018521,87403803,141422324,228826127,370248451,599074578,969323029,1568397607,2537720636,4106118243,6643838879,10749957122,17393796001,28143753123,45537549124,73681302247,119218851371,192900153618,312119004989,505019158607,817138163596,1322157322203,2139295485799,3461452808002,5600748293801,9062201101803,14662949395604,23725150497407,38388099893011,62113250390418,100501350283429,162614600673847,263115950957276,425730551631123,688846502588399,1114577054219522,1803423556807921,2918000611027443,4721424167835364,7639424778862807,12360848946698171,20000273725560978,32361122672259149,52361396397820127,84722519070079276,137083915467899403,221806434537978679,358890350005878082,580696784543856761,939587134549734843][int(input())])
import math
N = int(input())
ans = [0]*N
l = int(math.sqrt(N-2))

for i in range(1,l):
    for j in range(1,l):
        for k in range(1,l):
            if (i+j+k)**2-(i*j+j*k+k*i) <= N:
                ans[(i+j+k)**2-(i*j+j*k+k*i)-1] += 1

s = '\n'.join([str(n) for n in ans])
print(s)

### FIXED CODE ###

import math
N = int(input())
ans = [0]*N
l = int(math.sqrt(N))

for i in range(1,l):
    for j in range(1,l):
        for k in range(1,l):
            a = (i+j+k)**2-(i*j+j*k+k*i)
            if a <= N:
                ans[a-1] += 1

print(*ans, sep='\n')
import numpy as np

N = int(input())

arr = np.array(list(map(int, input().split())))
unique, cnts = np.unique(arr, return_counts=True)

counts = {}
sum = arr.sum()

for key, val in zip(unique, cnts):
    counts[key] = val

Q = int(input())

for i in range(Q):
    B, C = list(map(int, input().split()))
    counts[C] += counts[B]
    sum += counts[B] * (C - B)
    counts[B] = 0
    print(sum)


### FIXED CODE ###

import numpy as np
from collections import defaultdict

N = int(input())

arr = np.array(list(map(int, input().split())))
unique, cnts = np.unique(arr, return_counts=True)

counts = defaultdict(int)
sum = arr.sum()

for key, val in zip(unique, cnts):
    counts[key] = val

Q = int(input())

for i in range(Q):
    B, C = list(map(int, input().split()))
    counts[C] += counts[B]
    sum += counts[B] * (C - B)
    counts[B] = 0
    print(sum)