Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

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

bit = [[0, 0] for _ in range(41)]
while a <= b:
    val = bin(a)[2:]
    for i in range(1, len(val)+1):
        if val[-i] == '0': bit[-i][0] += 1
        else: bit[-i][1] += 1

    a += 1

ans = [0 for _ in range(41)]

for i in range(41):
    if bit[i][1] % 2 == 1: ans[i] = '1'
    else: ans[i] = '0'
        
print(int(''.join(ans), 2))

### FIXED CODE ###

a, b = map(int, input().split())
if a%2 == b%2: # 3, 4, 5  => 3^1 / 4, 5, 6 => 1^6
    k = (b-a)//2
    print(b^(k%2) if a%2==0 else a^(k%2))
elif a%2 == 0 and b%2 == 1: # 4, 5, 6, 7 => 1^1
    print(((b-a+1)//2)%2)
elif a%2 == 1 and b%2 ==0: # 3, 4, 5, 6 => 3^1^6
    print(a^b^((b-a-1)//2)%2)
### BUGGY CODE ###

from collections import defaultdict
from heapq import heappop, heappush,heapify
import sys
input = sys.stdin.readline

N,M,S = map(int,input().split())
UVAB = [list(map(int,input().split())) for i in range(M)]
U,V,A,B = zip(*UVAB)
mc = max(A)* M
g = defaultdict(list)

for u,v,a,b in UVAB:
    for i in range(a,mc+1):
        g[(u,i)].append(((v,i-a),b))
        g[(v,i)].append(((u,i-a),b))
CD = [[0,0]] + [list(map(int,input().split())) for i in range(N)]
C,D = zip(*CD)
C = [min(c,mc) for c in C]

for i in range(1,N+1):
    for c in range(mc+1-C[i]):
        g[(i,c)].append(((i,c+C[i]),D[i]))

S = min(S,mc)
dq = [(0,S,1)]

ans = [[10**15 for j in range(mc+1)] for i in range(N+1)]
while dq:
    t, w, v = heappop(dq)
    if ans[v][w] <= t:
        continue
    ans[v][w] = t
    for (nv,nw), nt in g[(v,w)]:
        if ans[nv][nw] > t + nt:
            heappush(dq,(t+nt,nw,nv))

for i in range(2,N+1):
    print(min(ans[i]))





### FIXED CODE ###

from collections import defaultdict
from heapq import heappop, heappush,heapify
import sys
input = sys.stdin.readline

N,M,S = map(int,input().split())
UVAB = [list(map(int,input().split())) for i in range(M)]
U,V,A,B = zip(*UVAB)

'''
from itertools import combinations 
N = 14
M = N*(N-1)//2
S = 0
UVAB = [[x,y,50,10**9] for x,y in combinations(range(1,N+1),2)] 
U,V,A,B = zip(*UVAB)
'''

mc = max(A)* M
g = defaultdict(list)

for u,v,a,b in UVAB:
    for i in range(a,mc+1):
        g[(u,i)].append(((v,i-a),b))
        g[(v,i)].append(((u,i-a),b))

CD = [[0,0]] + [list(map(int,input().split())) for i in range(N)]
#CD = [[0,0]] + [[10**9,10**9] for i in range(N)]
C,D = zip(*CD)
C = [min(c,mc) for c in C]

for i in range(1,N+1):
    for c in range(mc+1-C[i]):
        g[(i,c)].append(((i,c+C[i]),D[i]))

S = min(S,mc)
dq = [(0,S,1)]

ans = [[10**15 for j in range(mc+1)] for i in range(N+1)]
while dq:
    t, w, v = heappop(dq)
    if ans[v][w] <= t:
        continue
    for i in range(w+1):
        ans[v][i] = min(t, ans[v][i])
    for (nv,nw), nt in g[(v,w)]:
        if ans[nv][nw] > t + nt:
            heappush(dq,(t+nt,nw,nv))

for i in range(2,N+1):
    print(min(ans[i]))
### BUGGY CODE ###

import sys

input = sys.stdin.readline

ans = 0

n,m = map(int, input().split())
tpl = tuple([tuple(map(int, input().split())) for _ in range(m)])
ls = []
for i in range(1,n+1):
    tmpls = []
    for j in range(1,n+1):
        if i < j:
            if (i,j) in tpl:
                tmpls.append(j)
        elif i > j:
            if (j,i) in tpl:
                tmpls.append(j)
    ls.append(tuple(tmpls))
ls = tuple(ls)

def dfs(a, visitedls, ini, ininext):
    global flag
    visitedls.append(a)
    if a == ini:
        if ininext != visitedls[-2]:
            flag = True
    else:
        for b in ls[a-1]:
            if b not in visitedls:
                dfs(b, visitedls, ini, ininext)
    visitedls.remove(a)

def main():
    for i in range(n):
        for p in ls[i]:
            global flag, ans
            flag = False
            visitedls = []
            dfs(p, visitedls, i+1, p)
            if not flag:
                ans += 1
    print(int(ans/2))



if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
import numpy as np

input = sys.stdin.readline
n,m = map(int, input().split())
ls = np.zeros([n,n])
for _ in range(m):
    a, b = map(int, input().split())
    if ls[a-1][b-1] == 0:
        ls[a-1][b-1] = 1
        ls[b-1][a-1] = 1

def dfs(a, visitedls):
    visitedls.append(a)
    for b in range(1,n+1):
        if ls[a-1][b-1] == 1 and b not in visitedls:
            dfs(b, visitedls)

def main():
    ans = 0
    for i in range(n):
        for j in range(n):
            if ls[i][j] == 1:
                ls[i][j] = 0
                visitedls = []
                dfs(i+1, visitedls)
                if len(visitedls) != n:
                    ans += 1
                ls[i][j] = 1
    print(int(ans/2))



if __name__ == "__main__":
    main()
### BUGGY CODE ###

n =int(input())
a = list()

for _ in range(n):
    a.append(int(input()))

b = sorted(a)

for i in range(n):
    if a[i] == max(a):
        print(b[-2]) 
    else:
        print(max(a))


### FIXED CODE ###

n =int(input())
a = list()
 
for _ in range(n):
    a.append(int(input()))
 
b = sorted(a)

 
for i in range(n):
    if a[i] == b[-1]:
        print(b[-2]) 
    else:
        print(b[-1])
### BUGGY CODE ###

mod = 1000000007
def comb(n, r):
    if r < 1:
        return 1
    if r < n - r:
        r = n - r
    ans = 1
    for i, a in enumerate(range(n, n - r, -1), 1):
        ans *= a % mod
        ans //= i
    return ans % mod
def solve():
    n, k = map(int, input().split())
    for i in range(1, k + 1):
        print(comb(n - k + 1, i) * comb(k - 1, i - 1) % mod)
solve()


### FIXED CODE ###

from math import factorial
C = lambda y, x: factorial(y) // factorial(x) // factorial(y - x)
mod = 1000000007
def solve():
    n, k = map(int, input().split())
    for i in range(1, k + 1):
        if i <= (n - k) + 1:
            print(C(n - k + 1, i) * C(k - 1, i - 1) % mod)
        else:
            print(0)
solve()
### BUGGY CODE ###

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

MOD = 998244353

dp = [0]*(s+1) #動的計画法を用いる
dp[0] = 1

for i in range(n):
    for ss in range(s,-1,-1):
        if(ss >= a[i]):
            dp[ss] = (dp[ss]*2 + dp[ss-a[i]])%MOD #非常に大きな数になると考えられるため先にMOD計算を行う
        else:
            dp[ss] = dp[ss]*2 % MOD

print(dp[s])

### FIXED CODE ###

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

MOD = 998244353

dp = [[0]*(s+1) for i in range(n+1)] #動的計画法を用いる
dp[0][0] = 1

for i in range(n):
    for ss in range(s+1):
        if(ss >= a[i]):
            dp[i+1][ss] = (dp[i][ss]*2 + dp[i][ss-a[i]])%MOD #非常に大きな数になると考えられるため先にMOD計算を行う
        else:
            dp[i+1][ss] = dp[i][ss]*2 % MOD

print(dp[n][s])
### BUGGY CODE ###

import sys
from functools import reduce
from collections import defaultdict
def input(): return sys.stdin.readline().rstrip()


mod = 10**9+7


def prime(x):
    pf = defaultdict(int)
    for i in range(2, int(x**0.5)+1):
        while x % i == 0:
            pf[i] += 1
            x //= i
    if x > 1:
        pf[x] = 1
    return pf


def lcm(x, y):
    xx=x.copy()
    yy=y.copy()
    for k, v in yy.items():
        xx[k] = max(xx[k], yy[k])
    return xx


def flat(x, y):
    xx=x.copy()
    yy=y.copy()
    for k, v in yy.items():
        xx[k] -= yy[k]
    ans = 1
    for k, v in xx.items():
        ans = (ans*(k**v)) % mod
    return ans


def main():
    n = int(input())
    a = list(map(int, input().split()))
    a = list(map(prime, a))
    lcms = reduce(lcm, a)
    ans = 0
    for aa in a:
        ans += flat(lcms,aa)
    print(ans % mod)


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
from functools import reduce
from collections import defaultdict
def input(): return sys.stdin.readline().rstrip()


mod = 10**9+7


def prime(x):
    pf = defaultdict(int)
    for i in range(2, int(x**0.5)+1):
        while x % i == 0:
            pf[i] += 1
            x //= i
    if x > 1:
        pf[x] = 1
    return pf


def lcm(x, y):
    xx=x.copy()
    yy=y.copy()
    for k, v in yy.items():
        xx[k] = max(xx[k], v)
    return xx


def main():
    n = int(input())
    a = list(map(int, input().split()))
    a2 = list(map(prime, a))
    lcms = reduce(lcm, a2)
    lcmss = 1
    for k, v in lcms.items():
        lcmss = (lcmss*(k**v)) % mod
    ans = 0
    for aa in a:
        ans += lcmss*pow(aa,-1,mod)
    print(ans % mod)


if __name__ == '__main__':
    main()
### BUGGY CODE ###

from math import factorial
n = int(input())
a_list = sorted(list(map(int, input().split())))

a_i_index = len(a_list) - 1
a_i = a_list[-1]
max = 0
max_j_index = None
for j_index in range(n):
    a_j = a_list[j_index]
    comb = factorial(a_i) / (factorial(a_i - a_j) * factorial(a_j))
    if comb > max:
        max = comb
        max_j_index = j_index
print(a_i, " ", a_list[max_j_index])


### FIXED CODE ###

n = int(input())
a_list = sorted(list(map(int, input().split())))
 
a_i_index = len(a_list) - 1
a_i = a_list[-1]
max = 0
max_j_index = None
 
nobori = True
 
tmp = a_list[0]
koeta = None
for j_index in range(n):
    if a_list[j_index] * 2 > a_i:
        koeta = j_index
        break
    else:
        tmp = j_index
 
comb2 = 0
if n == 2:
    print(*[a_list[1], a_list[0]])
elif koeta == 0:
    print(*[a_i, a_list[koeta]])
elif (a_list[koeta]- a_i/2) > (a_i/2 - a_list[koeta-1]):
    print(*[a_i,a_list[koeta-1]])
else:
    print(*[a_i, a_list[koeta]])
### BUGGY CODE ###

import itertools
n=int(input()) 
L=list(map(int, input().split())) 
le =len(L)

count = 0
            
for i in range(le-1):
  for k in range(i+1,le-1):
    a,b =L[i],L[k]
    L_temp = L[k+1:]
    count = count + sum([1 for x in L_temp if a+b>x and a+x>b and b+x>a])
    
print(count)

### FIXED CODE ###

import bisect
n=int(input()) 
L=list(map(int, input().split())) 
L.sort()

count = 0        
for i in range(n-2):
  a = L[i]
  for k in range(i+1,n-1):
    b = L[k]

    count += bisect.bisect_left(L, a + b) - k -1
print(count)
### BUGGY CODE ###

n = int(input())
s_list = [sorted(list(input())) for _ in range(n)]
cnt = 0
for i in range(len(s_list) - 1):
    for j in range(i + 1, len(s_list)):
        if s_list[i] == s_list[j]:
            cnt += 1
print(cnt)


### FIXED CODE ###

n = int(input())
cnt = 0
s_dic = {}
for _ in range(n):
    s = ''.join(sorted(input()))
    if s in s_dic.keys():
        s_dic[s] += 1
        cnt += s_dic[s]
    else:
        s_dic[s] = 0

print(cnt)
### BUGGY CODE ###

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

#5sub = [A.count(i) for i in range(N)]

[print(j) for j in [A.count(i+1) for i in range(N)]]

### FIXED CODE ###

import numpy as np

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

sub = np.bincount(A, weights=None, minlength=N+1)

for i in range(N):
    print(sub[i+1])
### BUGGY CODE ###

# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

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

def mCn(m,n):
    return math.factorial(m)//(math.factorial(n)*math.factorial(m-n)) % mod
#modに対応して高速なコンビネーションが求められる
# 階乗 & 逆元計算
n = 10**6
factorial = [1]
inverse = [1]
for i in range(1, n+2):
    factorial.append(factorial[-1] * i % mod)
    inverse.append(pow(factorial[-1], mod-2, mod))

def combinations_count(n,r):
    if n-r < 0:
        return 0
    return factorial[n]*inverse[r]*inverse[n-r]%mod


ans = 0
for i in range(1,M):
    ans += (M-i)*N**2*i*(combinations_count(M*N-2,K-2))
    if ans > mod:
        ans = ans % mod

for i in range(1,N):
    ans += (N-i)*M**2*i*(combinations_count(M*N-2,K-2))
    if ans > mod:
        ans = ans % mod

print(ans)


### FIXED CODE ###

# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

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

def mCn(m,n):
    return math.factorial(m)//(math.factorial(n)*math.factorial(m-n)) % mod

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

N1 = 10**6
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N1 + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )


ans = 0
for i in range(1,M):
    ans += (M-i)*N**2*i*(cmb(M*N-2,K-2,mod))
    if ans > mod:
        ans = ans % mod

for i in range(1,N):
    ans += (N-i)*M**2*i*(cmb(M*N-2,K-2,mod))
    if ans > mod:
        ans = ans % mod

print(ans)
### BUGGY CODE ###

n, w = map(int, input().split())
dp = [0] * (w + 1)

for _ in range(n):
    wi, vi = map(int, input().split())
    for sum_w in range(w, wi - 1, -1):
        nv = dp[sum_w - wi] + vi
        if dp[sum_w] < nv:
            dp[sum_w] = nv
print(dp[w])


### FIXED CODE ###

def main():
    n, w = map(int, input().split())
    wv = [list(map(int, input().split())) for _ in range(n)]

    dp = [0] * (w + 1)
    for wi, vi in wv:
        for sum_w in range(w, wi - 1, -1):
            v = dp[sum_w - wi] + vi
            if dp[sum_w] < v:
                dp[sum_w] = v

    print(dp[w])


if __name__ == '__main__':
    main()
### BUGGY CODE ###

import fractions
from functools import reduce

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

def lcm_list(numbers):
  return reduce(lcm_base, numbers, 1)

mod = 10 ** 9 + 7
n = int(input())
numList = list(map(int, input().split()))

lcmTotal = lcm_list(numList)

result = 0
for targetNum in numList:
  result = (result + lcmTotal // targetNum) % mod

print(result)

### FIXED CODE ###

import fractions
from functools import reduce

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

def lcm_list(numbers):
  return reduce(lcm_base, numbers, 1)

mod = 10 ** 9 + 7
n = int(input())
numList = list(map(int, input().split()))

# lcmTotal = 1
# for i in numList:
#   lcmTotal = lcm_base(lcmTotal, i)

lcmTotal = lcm_list(numList)

result = 0
for targetNum in numList:
  result += lcmTotal // targetNum

print(result % mod)
### BUGGY CODE ###

n = int(input())
a = list(map(int,input().split()))
ans = 1
ju = 0
for i in range(n):
    ans = ans*a[i]


if ans<=10**18:
    print(ans)
else:
    print(-1)


### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
ans = 1
ju = 0
j = 0
if 0 in a:
    ju=1

for i in range(n):
    ans = ans*a[i]
    if ans>10**18:
        j = 1
        break

if ju==1:
    print(0)
elif j==1:
    print(-1)
else:
    print(ans)
### BUGGY CODE ###

n = int(input())
a = list(map(int,input().split()))
s = 1
for i in a:
    s *= i
    
if s>10**18:
    print(-1)
else:
    print(s) 

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
a.sort()
s = 1
for i in a:
    s *= i
    if s>10**18:
        print(-1)
        exit()
else:
    print(s)
### BUGGY CODE ###

N, W, H = [int(x) for x in input().split()]

map_x = [False] * W
count_x = 0
map_y = [False] * H
count_y = 0

for _ in range(N):
    x, y, r = [int(x) for x in input().split()]

    for a in [b for b in range(x - r, x + r) if 0 <= b < W]:
        if not map_x[a]:
            map_x[a] = True
            count_x += 1

    if count_x >= W:
        break

    for a in [b for b in range(y - r, y + r) if 0 <= b < H]:
        if not map_y[a]:
            map_y[a] = True
            count_y += 1

    if count_y >= H:
        break

print('Yes' if count_x >= W or count_y >= H else 'No')

### FIXED CODE ###

N, W, H = [int(x) for x in input().split()]

map_x = [0] * W
map_y = [0] * H

for _ in range(N):
    x, y, w = [int(x) for x in input().split()]
    mx = max(0, x - w)
    map_x[mx] = max(map_x[mx], x + w - mx)
    my = max(0, y - w)
    map_y[my] = max(map_y[my], y + w - my)


def check_wifi(wifi):
    m = 0
    end = len(wifi)

    for i, x in enumerate(wifi):
        if x and i + x > m:
            m = i + x

        if m >= end:
            return True

        if i < m:
            continue

        return False

    return False


print('Yes' if check_wifi(map_x) or check_wifi(map_y) else 'No')
### BUGGY CODE ###

x =lambda:list(map(int,input().split()))

n,m=x()
adjac = {i:[] for i in range(1,n+1)}

for _ in range(m):
    a,b = x()
    adjac[a].append(b)
    adjac[b].append(a)

comp = []

visited = {i:False for i in range(1,n+1)}

for i in range(1,n+1):
    if not visited[i]:
        queue = [i]
        count=1
        visited[i] = True
        while len(queue)!=0:
            h=queue[0]
            queue.pop(0)
            arr = adjac[h]
            # print(arr,i)
            for j in arr:
                if not visited[j]:
                    # print(j,h)
                    visited[j]=True
                    queue.append(j)
                    count+=1
        comp.append(count)

# print(comp)
comp.sort()
ans=0
sub = 0
for i in range(0,len(comp)):
    # print(sub)
    app = comp[i]-sub
    ans+=app
    sub+=app

print(ans)

### FIXED CODE ###

import sys

x =lambda:list(map(int,sys.stdin.readline().strip().split()))
n,m=x()
adjac = {i:[] for i in range(1,n+1)}

for _ in range(m):
    a,b = x()
    adjac[a].append(b)
    adjac[b].append(a)

comp = 0

visited = {i:False for i in range(1,n+1)}

for i in range(1,n+1):

    if not visited[i]:
        queue = [i]
        count=1
        visited[i] = True
        while len(queue)!=0:
            h=queue[0]
            queue.pop(0)
            arr = adjac[h]
            # print(arr,i)
            for j in arr:
                if not visited[j]:
                    # print(j,h)
                    visited[j]=True
                    queue.append(j)
                    count+=1
        comp=max(comp,count)
print(comp)
### BUGGY CODE ###

ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
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 make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

#maincode-------------------------------------------------
s = input()
q = ini()
cnt_one = 0
mae = ''
bac = ''
for i in range(q):
    a = input()
    if a[0] == '1':
        cnt_one += 1
        temp = mae
        mae = bac[::-1]
        bac = temp[::-1]
    else:
        if a[2] == '1':
            mae = a[4] + mae
        else:
            bac = bac + a[4]
if cnt_one%2:
    s = s[::-1]
print(mae + s + bac)

### FIXED CODE ###

ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
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 make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

#maincode-------------------------------------------------
s = input()
q = ini()
mae = ''
bac = s
for i in range(q):
    a = input()
    if a[0] == '1':
        temp = mae
        mae = bac
        bac = temp
    else:
        if a[2] == '1':
            mae = mae + a[4]
        else:
            bac = bac + a[4]
mae = mae[::-1]
print(mae + bac)
### BUGGY CODE ###

import sys

if __name__ == '__main__':
    n, m = list(map(lambda x: int(x), sys.stdin.readline().split(' ')))
    h = list(map(lambda x: int(x), sys.stdin.readline().split(' ')))
    matrix = {}

    for i in range(m):
        a, b = list(map(lambda x: int(x), sys.stdin.readline().split(' ')))
        a, b = a-1, b-1
        matrix[a] = matrix.get(a, []) + [b]
        matrix[b] = matrix.get(b, []) + [a]

    bads = {}
    good = 0
    # 展望台iが良い展望台か
    for i in range(n):
        if bads.get(i, 0) == 1:
            continue
        for t in matrix.get(i, []):
            if h[i] <= h[t]:
                break
            else:
                # 展望台tはもはや良い展望台でない
                if t > i:
                    bads[t] = 1
        else:
            good += 1
    print(good)

# matrixを疎行列にする
# 判定順をソートする


### FIXED CODE ###

import sys

if __name__ == '__main__':
    n, m = list(map(lambda x: int(x), sys.stdin.readline().split(' ')))
    h = list(map(lambda x: int(x), sys.stdin.readline().split(' ')))
    # matrix = {}
    # matrix = [[0 for i in range(n)] for j in range(n)]
    matrix = [[] for j in range(n)]

    for i in range(m):
        a, b = list(map(lambda x: int(x), sys.stdin.readline().split(' ')))
        a, b = a-1, b-1
        # matrix[a] = matrix.get(a, []) + [b]
        # matrix[b] = matrix.get(b, []) + [a]
        # matrix[a][b] = 1
        # matrix[b][a] = 1
        matrix[a].append(b)
        matrix[b].append(a)

    bads = {}
    good = 0
    # 展望台iが良い展望台か
    for i in range(n):
        if bads.get(i, 0) == 1:
            continue
        # for t in matrix.get(i, []):
        for t in matrix[i]:
            if h[i] <= h[t]:
                break
            else:
                # 展望台tはもはや良い展望台でない
                if t > i:
                    bads[t] = 1
        else:
            good += 1
    print(good)

# matrixを疎行列にする
# 判定順をソートする
### BUGGY CODE ###

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

cities = []
ps = {}

def to_id(x):
  return '0' * (6 - len(str(x))) + str(x)

for i in range(m):
  p, y = map(int, input().split())
  cities.append([p, y])
  if p in ps.keys():
    ps[p].append(y)
  else:
    ps[p] = [y]
  
years = {}
for p in ps.keys():
  years[p] = sorted(ps[p])

for i in range(m):
  p = cities[i][0]
  y = years[p].index(cities[i][1]) + 1
  print(to_id(p) + to_id(y))

### FIXED CODE ###

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

cities = []
ps = {}

def to_id(x):
  return '0' * (6 - len(str(x))) + str(x)

for i in range(m):
  p, y = map(int, input().split())
  cities.append([p, y, ''])
  if p in ps.keys():
    ps[p].append([y, i])
  else:
    ps[p] = [[y, i]]
  
years = {}
ids = {}
for p in ps.keys():
  years[p] = sorted(ps[p], key=lambda x: x[0])
  for i, year in enumerate(years[p]):
    cities[year[1]][2] += to_id(p) + to_id(i+1)

for i in range(m):
  print(cities[i][2])
### BUGGY CODE ###

import sys

def lucas(n):
    if n == 0:
        return 2
    if n == 1:
        return 1
    return lucas(n-2) + lucas(n-1)

def main():
    n = int(sys.stdin.readline().rstrip())
    print(lucas(n))

if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics

def main():
    n = int(sys.stdin.readline().rstrip())
    l = [None] * (n + 1); l[0], l[1] = 2, 1
    for i in range(1, n):
        l[i+1] = l[i] + l[i-1]
    print(l[n])

if __name__ == "__main__":
    # execute only if run as a script
    main()
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10**6)

def solve(n, h, cur, l):
  if cur > n:
    return True
  else:
    if l < h[cur]:
      return solve(n, h, cur+1, h[cur]-1) or solve(n, h, cur+1, h[cur])
    elif l == h[cur]:
      return solve(n, h, cur+1, h[cur])
    else:
      return False

N = int(input())
H = [-1]+list(map(int, input().split()))+[(10**9)+1]
print("Yes" if solve(N, H, 1, -1) else "No")



### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

def solve(n, h, cur, l):
  if cur > n:
    return True
  else:
    if l < h[cur]:
      return solve(n, h, cur+1, h[cur]-1)
    elif l == h[cur]:
      return solve(n, h, cur+1, h[cur])
    else:
      return False

N = int(input())
H = [-1]+list(map(int, input().split()))+[(10**9)+1]
print("Yes" if solve(N, H, 1, -1) else "No")