Harryxun/stf_run huggingface dataset:
def fib(n):
  if F[n] != 0:
    return F[n]
  elif n==0 or n==1:
    F[n] = 1
  else:
    F[n] = fib(n-1) + fib(n-2)

  return F[n]



n = input()
F = [44]
print fib(n)

### FIXED CODE ###

def fib(n):
  if F[n] != 0:
    return F[n]
  elif n==0 or n==1:
    F[n] = 1
  else:
    F[n] = fib(n-1) + fib(n-2)

  return F[n]



n = input()
F = [0 for row in range(n+1)]
print fib(n)
# -*- coding: utf-8 -*-
n = input()
l = []
tail = 0
for i in xrange(n):
    cmd = raw_input().split()
    if cmd[0] == "insert":
        l.append(cmd[1])
    elif cmd[0] == "delete":
        l.pop(l.lindex(cmd[1]))
    elif cmd[0] == "deleteFirst":
        l.pop()
    elif cmd[0] == "deleteLast":
        tail += 1

print " ".join(l[tail:][::-1])

### FIXED CODE ###

# -*- coding: utf-8 -*-
n = input()
l = []
tail = 0
for i in xrange(n):
    cmd = raw_input().split()
    if cmd[0] == "insert":
        l.append(cmd[1])
    elif cmd[0] == "delete":
        try:
            l.pop(len(l) - l[::-1].index(cmd[1]) -1)
        except ValueError:
            pass
    elif cmd[0] == "deleteFirst":
        l.pop()
    elif cmd[0] == "deleteLast":
        tail += 1

print " ".join(l[tail:][::-1])
a,b = map(int,raw_input().split(' '))
print a*b 2*(a+b)

### FIXED CODE ###

a,b = map(int,raw_input().split(' '))
print a*b,2*(a+b)
N = int(input())
an= sorted(set([input() for n in range(N)]))
print(an[-1]-an[0])

### FIXED CODE ###

N = int(input())
an= sorted(set([int(n) for n in input().split()]))
print(an[-1]-an[0])
n = int(input())
s = list(input())
c = 0
b = s[:n-1].count('#')
w = s[1:].count('.')
for i in range(n-1):
 if s[i] == '#' and s[i + 1] == '.':
  c += 1
  s[i +1] = '#'

print(min(c,b,w))

### FIXED CODE ###

a,b,c = map(int,input().split())
 
if c == min(a,b,c):
 print('No')
elif c == max(a,b,c):
 print('No')
else:
 print('Yes')
x = int(input())
y = int(input())
print(x + y/2)

### FIXED CODE ###

x,y = map(int ,input().split())
print(int(x+y/2))
import numpy as np
import functools
import math
import collections
import scipy
import fractions
import itertools

def solve():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    now = 0
    hoge= []
    bit = 0
    piyo = 0
    huga = []
    for i in range(k):
        hoge.append(now)
        now = a[now]-1
        if now in hoge:
            huga = hoge[hoge.index(now):len(hoge)]
            piyo = hoge.index(now)
            bit = 1
            break
    ans = huga[(k-piyo)%len(huga)]
    print(ans+1)
    return 0

if __name__ == "__main__":
    solve()


### FIXED CODE ###

def main():
    N, K = map(int, input().split())
    A = [a-1 for a in map(int, input().split())]    # 0-indexed に変換
    B = [None]*N    # 何ステップ目に到達したかを記録。Noneなら未到達を表す
    now = 0         # 現在地
    step = 0        # ステップ数
    B[now] = 0      # 開始地点は、0ステップ目に到達済みとする
    while K:
        now = A[now]    # 現在地を更新 
        step += 1
        K -= 1
        if B[now] is not None:  # ループを検出したら...
            K %= (step - B[now])      # Kからループ長さを引けるだけ引く
        else:
            B[now] = step  # 到達したステップ数を記録
    print(now+1)    # 1-indexed に再変換
 
main()
print((int(input()) - 1) * (int(input()) - 1))

### FIXED CODE ###

#!/usr/bin/env python3

def main():
    a, b = map(int, input().split())
    print((a - 1) * (b - 1))


if __name__ == "__main__":
    main()
a = input()
s = input()

if int(a)=>3200:
    print(s)
else:
    print("red")


### FIXED CODE ###

a = input()
s = input()

if int(a)>=3200:
    print(s)
else:
    print("red")
#!/usr/bin/env python3
s = input()
n = len(s)
ans = 0
cs = [0] * (n + 1)
cs[1] = cs[0] + int(s[0])
cs[2] = cs[1] + int(s[1])
cs[3] = cs[2] + int(s[2])
for i in range(n):
    for j in range(i + 3, n + 1):
        if i == 0 and j < n:
            cs[j + 1] = cs[j] + int(s[j])
        if (cs[j] - cs[i]) % 3 != 0:
            continue
        k = int(s[i:j])
        if k % 2019 == 0:
            ans += 1
print(ans)


### FIXED CODE ###

#!/usr/bin/env python3
s = input()[::-1]
n = len(s)
cs = [0] * (n + 1)
ten = 1
for i in range(n):
    cs[i + 1] = int(s[i]) * ten % 2019
    ten = ten * 10 % 2019
for i in range(n):
    cs[i + 1] = (cs[i + 1] + cs[i]) % 2019
cnt = [0] * 2019
for i, x in enumerate(cs):
    cnt[x] += 1
ans = sum(x * (x - 1) // 2 for x in cnt)
print(ans)
n=int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
ab.sort(key=lambda x: x[1])
#print(ab)
#print(b)
k=0
for t in range(n):
    k+=ab[n-1-t][0]
    #print([k,answer])
    if k>ab[n-1-t][1]:
        answer=answer*0
if answer==1:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n=int(input())
ab = [list(map(int, input().split())) for _ in range(n)]
ab.sort(key=lambda x: x[1])
#print(ab)
k=0
answer=1
for t in range(n):
    k+=ab[t][0]
    #print([k,answer])
    if k>ab[t][1]:
        answer=answer*0
if answer==1:
    print('Yes')
else:
    print('No')
N = int(input())
C = [-1]

for _ in range(N):
    c = int(input())
    if c == C[-1]:
        continue
    else:
        C.append(c)

MOD = 10**9+7
dp = 1
prev = [0]*(max(C)+1)

for c in enumerate(C[1:]):
    dp = (dp+prev[c]) % MOD
    prev[c] = dp
print(dp)


### FIXED CODE ###

N = int(input())
C = [-1]

for _ in range(N):
    c = int(input())
    if c == C[-1]:
        continue
    else:
        C.append(c)

MOD = 10**9+7
dp = 1
prev = [0]*(max(C)+1)

for c in C[1:]:
    dp = (dp+prev[c]) % MOD
    prev[c] = dp
print(dp)
from itertools import accumulate
n, k = map(int, input().split())
p = list(map(int, input().split()))
pp = list(accumulate(p))
ppp = [pp[i + k] - pp[i] + k for i in range(len(p) - k)]
print((max(ppp)) / 2)

### FIXED CODE ###

from itertools import accumulate
n, k = map(int, input().split())
p = list(map(int, input().split()))
if (n != k):
    pp = list(accumulate(p))
    ppp = [pp[i + k] - pp[i] + k for i in range(len(p) - k)]
    print((max(ppp)) / 2)
else:
    print((sum(p) + n) / 2)
N = int(input())
S = list(input())

count = []

for i in range(1,N-1):
    sum = 0
    sita = S[0:i]
    usiro = S[i:N]

    #print(sita,usiro)
    sita = list(set(sita))
    usiro = list(set(usiro))

    #print(sita,usiro)
    for x in range(len(sita)):
        if sita[x] in usiro:
            sum += 1

    count.append(sum)

print(max(count))


### FIXED CODE ###

N = int(input())
S = list(input())

count = []

if len(S) == 2:
    if S[0] == S[1]:
        count.append(1)
    else:
        count.append(0)
else:
    for i in range(1,N-1):
        sum = 0
        sita = S[0:i]
        usiro = S[i:N]

        #print(sita,usiro)
        sita = list(set(sita))
        usiro = list(set(usiro))

        #print(sita,usiro)
        for x in range(len(sita)):
            if sita[x] in usiro:
                sum += 1

        count.append(sum)

print(max(count))
n = int(input())
s, t = [int(input()) for i in range(2)]
out = ""
for i in range(n):
    out += s[i] + t[i]
print(out)


### FIXED CODE ###

n = int(input())
s, t = input().split()
out = ""
for i in range(n):
    out += s[i] + t[i]
print(out)
n, m = map(int, input().split())
if m % n == 0:
    print(m // n)
    exit()
for i in range(1,m//n):
    if m % i == 0:
        ret = i
print(ret)


### FIXED CODE ###

n, m = map(int, input().split())
divisors = []
for i in range(1,m+1):
    if i * i > m:
        break
    if i * i == m:
        divisors.append(i)
        break
    if m % i == 0:
        divisors.append(i)
        divisors.append(m // i)
ans = filter(lambda d: d <= m//n, divisors)
print(max(ans))
n = int(input()) -1
m = int(input()) -1
print(n * m)

### FIXED CODE ###

n,m = [int(i) -1 for i in input().split()]
print(n * m)
n,m=map(int,input().split())
a = []
b = []
ans = 0
for i in range(n):
    tempa,tempb = map(int,input().split())
    a.append(tempa)
    b.append(tempb)
test = dict(zip(a,b))
test = sorted(test.items())
# print(test)
# test_item = test.values()
# test_key = test.keys()
# print(test_item)
# print(test_key)
# for i in range(n):
#     if m-test[i][1] >=0:

i=0
while m>0:
    if m-test[i][1] >=0:
        ans += test[i][0]*test[i][1]
        m -=test[i][1]
    else:
        ans += test[i][0]*m
        m=0
        print(ans)
        exit()
    i+=1
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
a = []
b = []
ans = 0
for i in range(n):
    tempa,tempb = map(int,input().split())
    a.append(tempa)
    b.append(tempb)
test = list(zip(a,b))
test = sorted(test)
i=0
while m>0:
    if m-test[i][1] >=0:
        ans += test[i][0]*test[i][1]
        m -=test[i][1]
    else:
        ans += test[i][0]*m
        m=0
        print(ans)
        exit()
    i+=1
print(ans)
a,b=map(int,input().split())

if a%2==0:
    evena=1

if b%2==0:
    evenb=1

if evena != 1 and evenb != 1:
    print('Yes')
else:
    print('No')

    

### FIXED CODE ###

a,b=map(int,input().split())
evena,evenb = 0,0

if a%2==0:
    evena=1

if b%2==0:
    evenb=1

if evena != 1 and evenb != 1:
    print('Yes')
else:
    print('No')
a,b,k = list(map(int,input().split()))

temp = []

count = a

while count < a+k:
    if count == b:
        break
    print(count)
    temp.append(count)
    count += 1

count = b-k+1

while count <= b:
    if count < temp[-1]:
        count = temp[-1]
    if count in temp:
        count += 1
        continue
    print(count)
    count += 1



### FIXED CODE ###

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


temp = []

for i in range(a,a+k):
    temp.append(i)
    if i== b:
        break

for i in range(b-k+1,b+1):
    if i < a:
        continue
    if i in temp:
        continue
    temp.append(i)

for i in temp:
    print(i)
n = int(input())
lis = str(input())
r = []
g = []
b = []
for i in range(n):
  if lis[i] == "R":
    r.append(i)
  elif lis[i] == "G":
    g.append(i)
  else:
    b.append(i)
ans = len(r) * len(g) * len(b)
for i in range(n-2):
  for j in range(i+1,n-1):
    k = j + (j-i)
    if (lis[i] != lis[j]) and (lis[j] != lis[k]) and (lis[k] != lis[i]):
      ans -= 1
print(ans)

### FIXED CODE ###

n = int(input())
lis = str(input())
r = []
g = []
b = []
for i in range(n):
  if lis[i] == "R":
    r.append(i)
  elif lis[i] == "G":
    g.append(i)
  else:
    b.append(i)
ans = len(r) * len(g) * len(b)
for i in range(1,n-1):
  for j in range(i+1,n):
    if i != j and 2 * j -i <= n:
      k = j + (j-i)
      if (lis[i-1] != lis[j-1]) and (lis[j-1] != lis[k-1]) and (lis[k-1] != lis[i-1]):
        ans -= 1
print(ans)
import sys
    while 1:
    temp = input()
    if (temp==0):
    break
    N = temp
    a = []
    for i in range(N):
    a.append(map(int, raw_input().split())+[0])
    a.append([0 for i in range(0,temp+1)])	
    for i in range(0,temp):#行に関して
    for j in range(0,temp):#列に関して
    a[i][temp] += a[i][j]
    for k in range(0,temp+1):#列に関して
    for l in range(0,temp):#行に関して
    a[temp][k] += a[l][k]
    for m in range(0,temp+1):
    for n in range(0,temp+1):
    sys.stdout.write(str(a[m][n]).rjust(5))
    print ""
print ""

### FIXED CODE ###

import sys
try:
	while 1:
		temp = input()
		if (temp==0):
			break
		N = temp
		a = []
		for i in range(N):
			a.append(map(int, raw_input().split())+[0])
		a.append([0 for i in range(0,temp+1)])
		for i in range(0,temp):
			for j in range(0,temp):
				a[i][temp] += a[i][j]
		for k in range(0,temp+1):
			for l in range(0,temp):
				a[temp][k] += a[l][k]
		for m in range(0,temp+1):
			for n in range(0,temp+1):
				sys.stdout.write(str(a[m][n]).rjust(5))
			print ""
except(RuntimeError):
	pass
import sys
import numpy as np

def main(N, S):
    dp = np.zeros((N + 1, N + 1), dtype=int)
    ans=0
    for i in range(N - 1):
        for j in range(i + 1, N):
            dp[i][j] = min(j - i, dp[i - 1][j - 1] + 1) if S[i] == S[j] else 0
        ans = max(ans, max(dp[i]))
    return ans

if sys.argv[-1] == 'ONLINE_JUDGE':
    import numba
    from numba.pycc import CC
    i8 = numba.int64
    cc = CC('my_module')

    def cc_export(f, signature):
        cc.export(f.__name__, signature)(f)
        return numba.njit(f)

    main = cc_export(main, (i8, i8[:]))
    cc.compile()

from my_module import main

N = int(input())
S = [ord(_) for _ in input()]
print(main(N, S))


### FIXED CODE ###

import itertools
N = int(input())
S = input()
dp = [[0] * N for _ in range(N)]
ans = 0
for i, j in itertools.combinations(range(N), 2):
    if S[i] == S[j]:
        dp[i][j] = dp[i - 1][j - 1] + 1
    else:
        dp[i][j] = 0
    ans = max(ans, min(j - i, dp[i][j]))
print(ans)
S = input()
K = int(input())
if all(S[x] == '1' for x in range(K)):
  print(1)
  exit()
else:
  for i in S:
    if i != '1':
      print(i)
      exit()

### FIXED CODE ###

A, B = map(int,input().split(' '))
print((A-1) * (B-1))
nums=input()
nums=nums.replace(" ","")
nums=nums.replace(nums[0],"")
nums=int(nums)
if nums%4==0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

nums=input()
nums=nums.replace(" ","")
nums=int(nums)
if nums%4==0:
    print("YES")
else:
    print("NO")
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
mod=10**9+7

n,k=map(int,input().split())
a=list(map(int,input().split()))
m=0
if k==0:
    m=int(math.log2(1)+1)
else:
    m=int(math.log2(k)+1)
lst=[0]*m
for i in range(n):
    for j in range(m):
        if a[i]&(1<<j):
            lst[j]+=1
# print(lst)

ans=0
ans2=0
for i in range(m):
    if lst[m-i-1]<=n/2 and ans+pow(2,m-i-1)<=k:
        ans+=pow(2,m-i-1)
# print(ans)
# print(ans2)
for i in range(n):
    ans2+=ans^a[i]

print(ans2)


### FIXED CODE ###

import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
mod=10**9+7

n,k=map(int,input().split())
a=list(map(int,input().split()))
m=0
if k==0:
    m=int(math.log2(1)+1)
else:
    m=int(math.log2(k)+1)
lst=[0]*m
for i in range(n):
    for j in range(m):
        if a[i]&(1<<j):
            lst[j]+=1
# print(lst)

ans=0
ans2=0
for i in range(m):
    if lst[m-i-1]<=n/2 and ans+pow(2,m-i-1)<=k:
        ans+=pow(2,m-i-1)
# print(ans)
# print(ans2)
for i in range(n):
    ans2+=ans^a[i]

print(ans2)
n, m = map(int,input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
flag = 0
for i in range(n-m+1):
    for j in range(n-m+1):
        if a[i][i:i+m] == b[0] and a[i+1][i:i+m] == b[1]:
            flag = 1
print("Yes" if flag == 1 else "No")

### FIXED CODE ###

n, m = map(int,input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
r = any([r[j:j+m] for r in a[i:i+m]]==b for i in range(n-m+1) for j in range(n-m+1))
print("Yes" if r else "No")
a,b=map(int,input().split())
print((b-2)//(a-1)+1)

### FIXED CODE ###

n=int(input())
print(1/sum([1/float(i) for i in input().split()]))
#
# abc157 c
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3 3
1 7
3 2
1 7"""
        output = """702"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3 2
2 1
2 3"""
        output = """-1"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """3 1
1 0"""
        output = """-1"""
        self.assertIO(input, output)


def resolve():
    N, M = map(int, input().split())
    SC = [list(map(int, input().split())) for _ in range(M)]
    SC = set(map(tuple, SC))
    SC = list(set(SC))
    SC.sort()

    ans = -1
    for i in range(10**N):
        si = str(i)
        for sc in SC:
            s, c = sc
            if si[s-1] != str(c):
                break
        else:
            ans = i
            break

    print(ans)


if __name__ == "__main__":
    # unittest.main()
    resolve()


### FIXED CODE ###

#
# abc157 c
#
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3 3
1 7
3 2
1 7"""
        output = """702"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """3 2
2 1
2 3"""
        output = """-1"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """3 1
1 0"""
        output = """-1"""
        self.assertIO(input, output)


def resolve():
    N, M = map(int, input().split())
    SC = [list(map(int, input().split())) for _ in range(M)]
    SC = set(map(tuple, SC))
    SC = list(set(SC))
    SC.sort()

    ans = -1
    for i in range(10**N):
        si = str(i)
        if len(si) != N:
            continue
        for sc in SC:
            s, c = sc
            if si[s-1] != str(c):
                break
        else:
            ans = i
            break

    print(ans)


if __name__ == "__main__":
    # unittest.main()
    resolve()
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
import math
from collections import *
#from functools import reduce,cmp_to_key,lru_cache
import io, os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
import sys
# input = sys.stdin.readline



M = mod = 10**9 + 7 
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)
 
def li():return [int(i) for i in input().rstrip().split()]
def st():return str(input().rstrip())[2:-1]
def val():return int(input().rstrip())
def li2():return [str(i)[2:-1] for i in input().rstrip().split()]
def li3():return [int(i) for i in st()]
 



# sys.setrecursionlimit(10 ** 5 + 10)

g = 0
d = {}
def dp(i, par = -1, black = 0):
    global g
    ans = 1
    if (i, par, black) in d:return d[(i, par, black)]
    nokids = 1
    if black:
        for j in g[i]:
            if j != par:
                nokids = 0
                ans = ans * dp(j, i, 0) % mod
    else:
        for j in g[i]:
            if j != par:
                nokids = 0
                ans = ( ans * (dp(j, i, 0) + dp(j, i, 1)) ) % mod

    if nokids:ans = 1
    d[(i, par, black)] = ans
    return ans



n = val()
g = defaultdict(set)

l = []
for _ in range(n - 1):
    a, b = li()
    g[a].add(b)
    g[b].add(a)


root = 1    
ans = dp(root, -1, 0) + dp(root, -1, 1)

print(ans % mod)

### FIXED CODE ###

from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop,heapify
import math
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

from itertools import accumulate
from functools import lru_cache

M = mod = 10 ** 9 + 7
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)
 
def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]
 



sys.setrecursionlimit(10 ** 6)

g = 0
@lru_cache(None)
def dp(i, par = -1, black = 0):
    global g
    ans = 1
    nokids = 1
    if black:
        for j in g[i]:
            if j != par:
                nokids = 0
                ans = ans * dp(j, i, 0) % mod
    else:
        for j in g[i]:
            if j != par:
                nokids = 0
                ans = ( ans * (dp(j, i, 0) + dp(j, i, 1)) ) % mod

    if nokids:ans = 1
    return ans



n = val()
g = [[] for i in range(n + 1)]

l = []
for _ in range(n - 1):
    a, b = li()
    g[a].append(b)
    g[b].append(a)


root = 1    
ans = dp(root, -1, 0) + dp(root, -1, 1)

print(ans % mod)
s = list(x for x in input())
temp = 0
ans = []
for i in s:
  if i == 'A' or i == 'C' or i =='G' or i =='T':
    temp += 1
    if i == len(s) - 1:
      ans.append(temp)
  else:
    ans.append(temp)
    temp = 0
print(max(ans))


### FIXED CODE ###

s = list(x for x in input())
temp = 0
ans = []
for i in range(len(s)):
  if s[i] == 'A' or s[i] == 'C' or s[i] =='G' or s[i] =='T':
    temp += 1
    if i == len(s) - 1:
      ans.append(temp)
  else:
    ans.append(temp)
    temp = 0
print(max(ans))
n, k = map(int, input().split())
l = [int(i) for i in range(n+1)]
s = l[::-1]

ans = 0
for i in range(k, n+2):
  ans += sum(s[:i]) - sum(l[:i]) +1
  
print(ans%(int(1e9)+7))


### FIXED CODE ###

import math

n = int(input())

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

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

b ={i:0 for i in range(min(a)-1,max(a)+10)}

for i in a:
    b[i] += 1

c = 0
for i in range(1,len(b)-3):
    c = max(c,b[i]+b[i+1]+b[i+2])
print(c)

### FIXED CODE ###

n = int(input())

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

b ={i:0 for i in range(min(min(a),-1),max(a)+10)}
for i in a:
    b[i] += 1


c = 0
for i in range(len(b)-3):
    c = max(c,b[i]+b[i+1]+b[i+2])
print(c)
l=[*input()]
s=0
for i in range(1,len(l)):
    if l[i-1]==l[i]:
        s+=1
        if l[i]=='1':
            l[i]='0'
        else:
            l[i]='1'
print(s)


### FIXED CODE ###

a=list(input())
b=a[::-1]
n=len(a)
if n==1:
    print(0)
else:
    x=0
    y=0
    for i in range(n-1):
        if a[i]==a[i+1]:
            x+=1
            if a[i]=='0':
                a[i+1]='1'
            else:
                a[i+1]='0'
        if b[i]==b[i+1]:
            y+=1
            if b[i]=='0':
                b[i+1]='1'
            else:
                b[i+1]='0'
    print(min(x,y))
n, k = map(int, input().split())
s = input()
rev_s = s + s[::-1]
mido = "z" * n
for i in range(n + 1):
    if mido > rev_s[i:i + n]:
        mido = rev_s[i:i + n]
ind = float("inf")
for i in range(n):
    if mido[i] != mido[0]:
        if i < ind:
            ind = i
ans = ind * (2 ** min(k - 1, 100))
print((mido[0] * ans + mido[ind:ind + n - ans])[:n])

### FIXED CODE ###

n, k = map(int, input().split())
s = input()
rev_s = s + s[::-1]
mido = "z" * n
for i in range(n + 1):
    if mido > rev_s[i:i + n]:
        mido = rev_s[i:i + n]
ind = float("inf")
for i in range(n):
    if mido[i] != mido[0]:
        if i < ind:
            ind = i
ans = ind * (2 ** min(k - 1, 20))
print((mido[0] * ans + mido[ind:ind + n - ans])[:n])
n = int(input())
if n%2 == 1:
    print(0)
    
else:
    list5 = []
    flag = True
    num = 5
    while flag:
        tmp = n//(num*2)
        if tmp > 0:
            list5.append(tmp)
            num *= 5
        else:
            flag = False
    ans_list = []
    for i in range(len(list5)-1):
        ans_list.append(list5[i] - list5[i+1])
    ans_list.append(list5[-1])
    ans = 0
    for i in range(len(ans_list)):
        ans += ans_list[i]*(i+1)
    print(ans)

### FIXED CODE ###

n = int(input())
if n%2 == 1:
    print(0)
    
else:
    if n < 10:
        print(0)
    else:
        list5 = []
        flag = True
        num = 5
        while flag:
            tmp = n//(num*2)
            if tmp > 0:
                list5.append(tmp)
                num *= 5
            else:
                flag = False
        ans_list = []
        for i in range(len(list5)-1):
            ans_list.append(list5[i] - list5[i+1])
        ans_list.append(list5[-1])
        ans = 0
        for i in range(len(ans_list)):
            ans += ans_list[i]*(i+1)
        print(ans)
X = input()
A = input()
B = input()
Y = int((X - A)/B)
print(X - A - (B*Y))

### FIXED CODE ###

X = int(input())
A = int(input())
B = int(input())
Y = int((X - A)/B)
print(X - A - (B*Y))