Harryxun/stf_run huggingface dataset:
while True:
    (m, f, r) = [int(i) for i in input().split()]
        if m==-1 and f==-1 and r==-1:
            break

    g = m + f
    if m == -1 or f == -1 or g < 30:
        print('F')
    elif g >= 80:
        print('A')
    elif g >= 65:
        print('B')
    elif g >= 50 or r >= 50:
        print('C')
    else:
        print('D')
~                   

### FIXED CODE ###

while True:
    (m, f, r) = [int(i) for i in input().split()]
    if m == f == r == -1:
        break
 
    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')
    elif total < 50 and r < 50:
        print('D')
    elif total < 65:
        print('C')
    elif total < 80:
        print('B')
    else:
        print('A')
s = input()
if s[:4] < 2019 or s[:4] == 2019 and s[6:7] <= 4:
  print("Heisei")

### FIXED CODE ###

s = input()
 
if s <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')
word = raw_input()
counter = 0
while True:
    line = raw_input()
    if line == "end_of_text":
        break
    counter += line.lower().split(" ").count(word)

print counter

### FIXED CODE ###

word = raw_input()
counter = 0
while True:
    line = raw_input()
    if line == "END_OF_TEXT":
        break
    counter += line.lower().split(" ").count(word)

print counter
N=int(input())
data = list(map(int, input().split()))
ans=1
if N>1:
    for i in range(1,N):
        if data[i]<=data[i-1]:
            ans+=1
print(ans)

### FIXED CODE ###

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

if N==M:
    print("Yes")

if N!=M:
    print("No")
n = int(input())
c = 0

for x in range(2, n // 2 + 1)
  if n % x == 0:
    c += 1

print(c)

### FIXED CODE ###

n = int(input())
c = 0

for x in range(1, n + 1, 2):
    if sum(1 for y in range(1, x // 2) if x % y == 0) == 7:
        c += 1

print(c)
n=1001
a=range(1,n)
a+=[n]+a[::-1]
for n in map(int,sys.stdin):
  x=0
  for i in range(max(0,n-2000),min(n,2000)+1):
    x+=a[i]*a[n-i]
  print x

### FIXED CODE ###

import sys
n=1001
a=range(1,n)
a+=[n]+a[::-1]
for n in map(int,sys.stdin):
  print sum([a[i]*a[n-i] for i in range(max(0,n-2000),min(n,2000)+1)])
n = int(input())
a = list(map(int, input().split()))

cnt=0
for i in range(1,n):
    
    # 条件満たすまでループ
    for _ in range(3):
        print(a)
    
        now_tmp = sum(a[:i])
        next_tmp = sum(a[:i+1])
        print(i, now_tmp, next_tmp)
        
        # 符号が逆転していればOK かつ 現在までの総和が0でない
        #  異なる符号を掛けるとマイナスになる
        if now_tmp * next_tmp <0 and now_tmp !=0:
            break
        else:
            # 現在の合計がマイナスの場合
            if now_tmp < 0:
                a[i] += next_tmp+1
                cnt +=abs(next_tmp+1)

            # 現在の合計がプラスの場合
            elif now_tmp > 0 :
                a[i] += -next_tmp-1
                cnt +=abs(next_tmp+1)
            # 現在の合計が0の場合
            elif now_tmp == 0 :
                # 1個前がプラスの場合、
                if sum(a[:i-1]) > 0:
                    a[i] += -next_tmp+1
                    cnt +=abs(next_tmp+1)
                # 1個前がマイナスの場合
                else:
                    a[i] += next_tmp+1
                    cnt +=abs(next_tmp+1)
                
print(cnt)

### FIXED CODE ###

n = list(input().split())

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

# flg:True プラスの想定
def chk(A, flg):
    #print("-------")
    # 初期値
    x=0
    ans =0
    for a in A:
        # 今までの合計
        x += a
        
        # 想定と違ったら、1との差分を増減する
        if flg==True and x < 1:
            ans +=1-x
            # xは1に変える
            x=1
        elif flg == False and x> -1:
            ans += x+1
            x=-1
        #print(x)
        flg = not flg

    return(ans)
print(min(chk(A, True),chk(A, False)))
N, I=map(int, input(). split())
print(N-i+1)


### FIXED CODE ###

N, i=map(int, input(). split())
print(N-i+1)
N = int(input()), sum = 0, mx = 0
for i in range(n):
  P = int(input())
  sum += P
  mx = max(mx, P)

print(sum - mx / 2)

### FIXED CODE ###

N = int(input())
sm,mx = 0,0
for i in range(N):
  P = int(input())
  sm += P
  mx = max(mx, P)

a = int(sm - mx / 2)
print(a)
N, K = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
M = 10**9 + 7
A = sorted(A, key=abs, reverse=1)
# 負の数になる場合
if max(A) < 0:
    result = 1
    for i in range(K):
        result = result * A[-i-1] % M
    print(result)
    exit()

minimum_minus_id = K
minimum_plus_id = K
minus_count = 0

for i in range(K):
    if A[i] < 0:
        minus_count += 1
        minimum_minus_id = i
    else:
        minimum_plus_id = i
result = 1

if minus_count%2 == 1:
    # 一番小さい負の数を正の数にするか、一番小さい正の数を負の数にするか
    second_minus_id = N
    second_plus_id = N

    for i in range(K, N):
        if A[i] >= 0:
            second_plus_id = i
            break
    for i in range(K, N):
        if A[i] < 0:
            second_minus_id = i
            break
    if second_minus_id == N or minimum_plus_id == K:
        A[minimum_minus_id] = A[second_plus_id]
    elif second_plus_id == N:
        A[minimum_plus_id] = A[second_minus_id]

    else:
        if A[minimum_minus_id] * A[second_minus_id ] > A[minimum_plus_id] * A[second_plus_id]:
            A[minimum_plus_id] = A[second_minus_id]
        else:
            A[minimum_minus_id] = A[second_plus_id]

for i in range(K):
    result = result * A[i] % M
print(result)

### FIXED CODE ###

n, k = map(int, input().split())
a_list = list(map(int, input().split()))
mod = 10**9+7
a_list.sort()
ans = 1
if k % 2 == 1 and a_list[-1] < 0:
    for i in range(k):
        ans *= a_list[n - 1 - i]
        ans %= mod
else:
    l = 0
    r = -1
    mlt1 = a_list[0] * a_list[1]
    mlt2 = a_list[-2] * a_list[-1]
    count = 0
    while True:
        if count == k:
            break
        elif count == k - 1:
            ans *= a_list[r] % mod
            ans %= mod
            break
        if mlt1 >= mlt2:
            ans *= mlt1 % mod
            l += 2
            count += 2
            if l <= n - 2:
                mlt1 = a_list[l + 1] * a_list[l]
        else:
            ans *= a_list[r] % mod
            r -= 1
            count += 1
            if r >= - n + 1:
                mlt2 = a_list[r - 1] * a_list[r]
        ans %= mod
print(ans)
C = input()
lis = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
       'p', 'q', 'r', 's', 't'. 'u', 'v', 'w', 'x', 'y', 'z']
for x in range(len(lis)):
  if C == lis[x]:
    print(lis[x+1])
    break

### FIXED CODE ###

C = input()
lis = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
       'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for x in range(len(lis)):
  if C == lis[x]:
    print(lis[x+1])
    break
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
memo = {}
pq = []
for i in range(N-1):
    for j in range(i+1,N):
        pq.append([xy[j][0]-xy[i][0], xy[j][1]-xy[i][1]])
for p, q in pq:
    index = str(p) + str(q)
    if index in memo:
        memo[index] += 1
    else:
        memo[index] = 1
print(N-max(memo.values()))

### FIXED CODE ###

N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]
x, y = [], []
for i, j in xy:
    x += [i]
    y += [j]
ans = 0
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        p = x[j] - x[i]
        q = y[j] - y[i]
        c = 0
        for k in range(N):
            for l in range(N):
                if k == l:
                    continue
                if (x[k] - x[l]) == p and (y[k] - y[l]) == q:
                    c += 1
        ans = max(ans, c)
if N != 1:
    print(N-ans)
else:
    print('1')
s=input()
if s[3]==s[4] and s[5]==s[6]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

s = input()
if s[2] == s[3] and s[4] == s[5]:
  print("Yes")
else:
  print("No")
X = input()
if X >= 30:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

X = int(input())
if X >= 30:
  print('Yes')
else:
  print('No')
a,b,c = map(int,input().split())
print(max(a+b,a-b,a*b))

### FIXED CODE ###

a,b = map(int,input().split())
print(max(a+b,a-b,a*b))
def edit_distance(d):
 n =len(d)
 A=[[0 for i inrange(n)] for j in range(n)]
 for long in range(2, n+1):
  for i in range(0,n+1-long):
   k=i-1+long
   def f(i,j,k):
    return A[i][j-1]+A[j][k]+]+M[i][0]*M[j-1][1]*M[k][1]
   A[i][k] = min([f(i,j,k) for j in range(i+1,k+1)])
  return A[0][n-1]
n = input()
M = []
for i in range(n):
 M.append(map(int, raw_input().split()))
print edit_distance(M)

### FIXED CODE ###

def edit_distance(M):
  n = len(M)



  m = [[0 for i in range(n)] for j in range(n)]
   
  for long in range(2, n+1):

    for i in range(0, n-long+1):

      j = i + long - 1

      def a(i, k ,j):
        return m[i][k] + m[k+1][j] + M[i][0]*M[k][1]*M[j][1]
      m[i][j] = min(a(i, k, j) for k in range(i, j))
   
  return m[0][n-1]
 
n = input()
M = []
 
for i in range(n):
  M.append(map(int, raw_input().split()))
print edit_distance(M)
N = int(input())
 
result = 0
for i in range(1, int(N**0.5)+1):
  # 偽物が通ってしまう．sample 2 の時，999999ずれる
  if (N - i) % i == 0:
    temp = (N - i) // i
    if N // temp == N % temp:
      result += temp

print(int(result))

### FIXED CODE ###

N = int(input())

result = 0
for i in range(1, int(N**0.5)+1):
  if N % i == 0:
    for j in set([i, N//i]):
      num = j - 1
      if num != 0 and N // num == N % num:
        result += num

print(int(result))
import math
a,b = map(int,input().split())
if (a < b):
    if b % a == 0:
        print(b)
    else:
        print(b * (a // math.gcd(a, b)))
else:
    if a % b == 0:
        print(a)
    else:
        print(a * (b // math.gcd(a, b)))


### FIXED CODE ###

import fractions
a,b = map(int,input().split())
if (a < b):
    if b % a == 0:
        print(b)
    else:
        print(b * (a // fractions.gcd(a, b)))
else:
    if a % b == 0:
        print(a)
    else:
        print(a * (b // fractions.gcd(a, b)))
a,op,b = map(int, input())

if op == "+":
  print (a+b)
else:
  print(a-b)


### FIXED CODE ###

instr = list(map(str, input().split()))
a = int(instr[0])
b = int(instr[2])
op = instr[1] 
if op == "+":
  print (a+b)
else:
  print(a-b)
from numpy import*
(N,T),*L=loadtxt(open(0)).tolist()
d=zeros(1e4,int)
for w,v in sorted(L):t=d[w:T+w];s=d[:T]+v;t[t<s]=s
print(max(d))

### FIXED CODE ###

N, T, *AB = map(int, open(0).read().split())

dp = [0] * (T + max(AB[::2]))
for w, v in sorted(zip(*[iter(AB)] * 2)):
    for i in reversed(range(T)):
        dp[i + w] = max(dp[i + w], dp[i] + v)

print(max(dp))
S = input()
K = int(input())
 
 
buf=''
cnt = 1
total = 0
cnts = []
 
 
for s in S:
    #print(buf,s,cnt)
    if s == buf:
        cnt += 1       
    else:
        cnts.append(cnt)
        total += int(cnt/2)
        cnt = 1        
    buf = s
cnts.append(cnt)    
total += int(cnt/2)
 
if len(S)==1:
    print(int(K/2))
    
elif len(set(list(S)))==1:
    print(int(len(S*K)/2))
 
elif S[0]==S[-1] and cnts[1] % 2 != 0:
    if (cnts[1]+cnts[-1]) % 2 == 0:
        print(total*K+K-1)
    else:
        print(total*K)
else:
    print(total*K)

### FIXED CODE ###

from itertools import groupby
S = input()
K = int(input())
a = [len(tuple(s)) for _, s in groupby(S)]
ans = 0
 
if S[0] == S[-1] and K > 1:
    if len(a) == 1:
        ans = a[0]*K // 2
    else:
        ans = a[0] // 2 + a[-1] // 2 + (a[0]+a[-1]) // 2 * (K-1)
        ans += sum(n // 2 for n in a[1:-1]) * K
else:
    ans = sum(n // 2 for n in a) * K
print(ans)
n,q=map(int,input().split())
cnt=[0]*n
used=[0]*n
edges=[[] for i in range(n)]
for i in range(n-1):
    a,s=map(int,input().split())
    edges[a-1].append(s-1);edges[s-1].append(a-1)
import sys
input=sys.stdin.buffer.readline
sys.setrecursionlimit(10**9)
def f(now):
    for to in  edges[now]:
        if used[to]:continue
        cnt[to]+=cnt[now]
        used[to]=1
        f(to)
for i in range(q):
    p,x=map(int,input().split())
    cnt[p-1]+=x

used[0]=1
f(0)
print(*cnt)

### FIXED CODE ###

import sys
input=sys.stdin.buffer.readline
sys.setrecursionlimit(10**9)
n,q=map(int,input().split())
cnt=[0]*(n)
edges=[0]*n
for i in range(n):
    edges[i]=[]
for i in range(n-1):
    a,s=map(int,input().split())
    edges[a-1].append(s-1);edges[s-1].append(a-1)

from collections import deque
dq=deque([])
#pop/append/(append,pop)_left/in/len/count/[]/index/rotate()(右へnずらす)
for i in range(q):
    p,x=map(int,input().split())
    cnt[p-1]+=x

for i in edges[0]:
    dq.append((0,i))
while dq:
    f,t=dq.popleft()
    cnt[t]+=cnt[f]
    for to in edges[t]:
        if to!=f:dq.append((t,to))
    
print(*cnt)
S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>3:
    print('NO')
else:
    for i in range(len(S)-1):
        if S[i]==S[i+1]:
            print('NO')
            sys.exit()
        elif S[i]=='K' and S[i+1]!='I':
            print('NO')
            sys.exit()
    for i in range(len(S)):
        if Q[i]==U[i]:
            pass
        else:
            print('NO')
            break
    else:
        print('YES')

### FIXED CODE ###

S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
    print('NO')
    sys.exit()
elif len(Q)!=5:
    print('NO')
    sys.exit()
for i in range(len(S)):
    if S[i] not in list('AKIHABARA'):
        print('NO')
        sys.exit()
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        print('NO')
        sys.exit()
    elif S[i]=='K' and S[i+1]!='I':
        print('NO')
        sys.exit()
    elif S[i]=='I' and S[i+1]!='H':
        print('NO')
        sys.exit()
for i in range(len(U)):
    if Q[i]==U[i]:
        pass
    else:
        print('NO')
        break
else:
    print('YES')
def dfs(A,B):
    if len("".join(A))>10:
        return
    if int(A[-1]) == 0:
        for i in [0,1]:
            A.append(str(i))
            B.append("".join(A))
            dfs(A, B)
            A.pop()
    elif int(A[-1]) == 9:
        for i in [8,9]:
            A.append(str(i))
            B.append("".join(A))
            dfs(A, B)
            A.pop()
    else:
        for i in range(int(A[-1])-1,int(A[-1])+2):
            A.append(str(i))
            B.append("".join(A))
            dfs(A,B)
            A.pop()

if __name__ == "__main__":
    k=int(input())
    ans_list=[]
    num_list=[]
    for i in range(1,10):
        ans_list.append(str(i))
        num_list.append(str(i))
        dfs(num_list,ans_list)
        num_list.clear()
    ans_list=sorted(ans_list,key=int)
    print(ans_list[k-1])



### FIXED CODE ###

def dfs(A,B):
    if len("".join(A))>10:
        return
    if int(A[-1]) == 0:
        for i in [0,1]:
            A.append(str(i))
            B.append("".join(A))
            dfs(A, B)
            A.pop()
    elif int(A[-1]) == 9:
        for i in [8,9]:
            A.append(str(i))
            B.append("".join(A))
            dfs(A, B)
            A.pop()
    else:
        for i in range(int(A[-1])-1,int(A[-1])+2):
            A.append(str(i))
            B.append("".join(A))
            dfs(A,B)
            A.pop()

if __name__ == "__main__":
    k=int(input())
    ans_list=[]
    num_list=[]
    for i in range(1,10):
        ans_list.append(str(i))
        num_list.append(str(i))
        dfs(num_list,ans_list)
        num_list.clear()
    ans_list=sorted(ans_list,key=int)
    print(ans_list[k-1])
n,k = map(int,input().split())
A = list(map(int,input().split()))
sub = [0]*n
city = 0
all = []
roop = []
while sub[city] != 2:
  if sub[city] == 0:
    all.append(city+1)
  else:
    roop.append(city+1)
  sub[city] += 1
  city = A[city] -1
if len(roop)<k:
  print(roop[(k-(len(all)-len(roop)))%len(roop)])
else:
  print(all[k])


### FIXED CODE ###

n,k = map(int,input().split())
A = list(map(int,input().split()))
sub = [0]*n
city = 0
all = []
roop = []
while sub[city] != 2:
  if sub[city] == 0:
    all.append(city+1)
  else:
    roop.append(city+1)
  sub[city] += 1
  city = A[city] -1
if len(all) > k:
  print(all[k])
else:
  print(roop[(k-(len(all)-len(roop)))%len(roop)])
from math import sqrt
N = int(input()) # 2 <= N <= 10^12
# (1,1) (x,y) = x*y
a = N-1
for x in range(2, int(sqrt(N))+1):
  q, r = divmod(N, x):
  if r == 0:
    a = min(x-1 + q - 1, a)
print(a)
    
    
  
  

### FIXED CODE ###

from math import sqrt
N = int(input()) # 2 <= N <= 10^12
# (1,1) (x,y) = x*y
a = N-1
for x in range(2, int(sqrt(N))+1):
  q, r = divmod(N, x)
  if r == 0:
    a = min(x-1 + q - 1, a)
print(a)
# coding: utf-8
# Your code here!

n,m,k = map(int,input().split())
listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。
x=[[0] * m for i in range(2**n)] 
#print(listA)
for i in range(2 ** n):
    for j in range(n):
        if((i >> j) & 1 ):
            x[i][0] += listA[j][0]
            x[i][1] += listA[j][1]
            x[i][2] += listA[j][2]
#print(x)

cnt = 10**9
t = [k] * m
for i in x:
    u = 0
    for j in range(1, m-1):
        if i[j] < t[j]:
            u = 1
        if u != 1:
            if cnt >= i[0]:
                cnt = i[0]
    #print(cnt)    
if cnt != 10**9:
    print(cnt)
else:
    print(-1)
         

### FIXED CODE ###

# coding: utf-8
# Your code here!

n,m,k = map(int,input().split())
listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。
x=[[0] * (m+1) for i in range(2**n)] 
#print(listA)
for i in range(2 ** n):
    for j in range(n):
        if((i >> j) & 1 ):
            for l in range(m+1):
                x[i][l] += listA[j][l]
            
#print(x)
#print(list(range(1,m+1)))
cnt = 10**10
t = [k] * (m+1)
#print(t)
f = 0
for i in x:
    #print(i)
    u = 0
    for j in range(1, m+1):
        #print(1)
        if i[j] < t[j]:
            u = 1
    if u != 1:
        if cnt >= i[0]:
            cnt = i[0]
            f = 1
    #print(cnt)    
if f != 0:
    print(cnt)
else:
    print(-1)
N,K=map(int,input().split())
L=list(map(int,input().split()))
cnt=0
i=0
SET=set()
S=[]
while not(L[i] in SET):
    S.append(i+1)
    SET.add(i+1)
    i=L[i]-1

    
S.append(i+1)
SS=S


S=S[S.index(L[i]):]

cnt=len(S)



print(SS[K%(cnt)])

### FIXED CODE ###

N=input()
NN=input()

if len(NN)==len(N)+1:
    if NN[:len(N)]==N:
        print("Yes")
    else:
        print("No")
else:
    print("No")
import networkx

def factorial(n, mod):
    fac = [0] * (n + 1)
    inv = [0] * (n + 1)
    fac[0], inv[0] = 1, 1
    for i in range(1, n + 1):
        fac[i] = fac[i-1] * i % mod
        inv[i] = inverse(fac[i], mod)
    return fac, inv

def inverse(a, mod):
    a %= mod # 除数が正なら正になる
    p = mod
    x, y = 0, 1
    while a > 0:
        n = p // a
        p, a = a, p % a, 
        x, y = y, x - n * y
    return x % mod # 除数が正なら正になる

mod = 1000000007

n, k = map(int, input().split())
graph = networkx.Graph()
graph.add_nodes_from(range(n))
for _ in range(n-1):
    a, b = map(lambda x : int(x) - 1, input().split())
    graph.add_edge(a, b)

fac, inv = factorial(k, mod)
ans = fac[k] * inv[k - networkx.degree(graph)[0] - 1] % mod # nx.degree(graph)[0]:グラフの頂点0から出ている枝の数
for parent, child in networkx.dfs_edges(graph, 0): # nx.dfs_edges(graph, 0):グラフの頂点0からDFS
    ans = ans * fac[k-2] % mod * inv[k-1-networkx.degree(graph)[child]] % mod
print(ans)


### FIXED CODE ###

def factorial(n, mod):
    fac = [0] * (n + 1)
    inv = [0] * (n + 1)
    fac[0], inv[0] = 1, 1
    for i in range(1, n + 1):
        fac[i] = fac[i-1] * i % mod
        inv[i] = inverse(fac[i], mod)
    return fac, inv

def inverse(a, mod):
    a %= mod # 除数が正なら正になる
    p = mod
    x, y = 0, 1
    while a > 0:
        n = p // a
        p, a = a, p % a, 
        x, y = y, x - n * y
    return x % mod # 除数が正なら正になる

mod = 1000000007
n, k = map(int, input().split())
        
nodes = [[] for _ in range(n)]

branch_n = [0] * n
for i in range(n-1):
    a, b = map(lambda x : int(x) - 1, input().split())
    nodes[a].append(b)
    nodes[b].append(a)

if len(nodes[0]) >= k:
    print(0)
    quit()
stack = nodes[0][:]
visited = {0}
fac, inv = factorial(k, mod)
ans = fac[k] * inv[k-len(nodes[0])-1] % mod
while stack:
    i = stack.pop()
    visited.add(i)
    m = len(nodes[i])
    if m >= k:
        print(0)
        quit()
    ans = ans * fac[k-2] % mod * inv[k-1-m] % mod
    for j in nodes[i]:
        if not j in visited:
            stack.append(j)
print(ans)
s = input()

flag = True
for i in range(len(s)):
  if i % 2 == 0:
    if s[i] not in ['R', 'U', 'D']:
      flag = False
      break
  else:
    if s[i] not in ['L', 'U', 'D']:
      flag = False
      break
  
result = 'Yes' if flag else 'No'
print(result)
v

### FIXED CODE ###

s = input()

flag = True
for i in range(len(s)):
  if i % 2 == 0:
    if s[i] not in ['R', 'U', 'D']:
      flag = False
      break
  else:
    if s[i] not in ['L', 'U', 'D']:
      flag = False
      break
  
result = 'Yes' if flag else 'No'
print(result)
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]


def fib(n):
    a, b = 0, 1
    for i in range(n):
        a, b = b, a + b
    return b


if n == 0:
    print(0)
elif n == 1:
    print(1)

total = 1
i = 0
for x in a:
    if x == i:
        print(0)
        exit()
    total *= fib(x - i - 1)
    i = x + 1
if a[-1] != n:
    total *= fib(n - (a[-1] + 1))

print(total % 1000000007)

### FIXED CODE ###

def fib(n):
    a, b = 0, 1
    for i in range(n):
        a, b = b, a + b
    return b


n, m = map(int, input().split())
if m == 0:
    print(fib(n) % 1000000007)
    exit()
a = [int(input()) for _ in range(m)]

total = 1
i = 0
for x in a:
    if x == i:
        print(0)
        exit()
    total *= fib(x - i - 1)
    i = x + 1
if a[-1] != n:
    total *= fib(n - (a[-1] + 1))

print(total % 1000000007)
import math

A, B = map(int, input().split())

# 右からi bit(0-index)について、何番目にいるかをかんがえる
# 0: 0 ~ 2^i - 1
# k: 2^(ki) ~ 2^((k + 1)i) - 1
# k_A = int(log(2^i)(A))
# 間で変換される回数は、K = k_B - k_A 回
# K: 偶数→ 0、奇数→1

b = (B - A + 1) // 2
if A % 2 + B % 2 == 0:
    b = max(0, b - 1)
res = str(b % 2)

k_a = A
k_b = B
for i in range(1, int(math.log2(B)) + 1):
    k_a //= 2
    k_b //= 2
    num_bit = 0
    if k_a % 2:
        num_bit += 2 ** i - A % (2 ** i)
    if k_b % 2:
        num_bit += B % (2 ** i) + 1

    res = str(num_bit % 2) + res

print(int(res, 2))


### FIXED CODE ###

A, B = map(int, input().split())

res = 0
if A % 2:
    res ^= A
    A += 1

if B % 2 == 0:
    res ^= B
    B -= 1

K = (B - A + 1) // 2
res ^= K % 2
print(res)