Harryxun/stf_run huggingface dataset:
n, m = map(int, input().split())
an = [int(input()) for _ in range(m)]

dp = [0 for _ in range(n+1)]
dp[0] = 1
mod = 10**9 + 7

if an[0] == 1:
    dp[1] = 0
    a = 1
else:
    dp[1] = 1
    a = 0

for i in range(2, n+1):
    if i == an[a]:
        dp[i] = 0
        a += 1
        if a == len(an):
            a -= 1
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % mod

print(dp[n])



### FIXED CODE ###

n, m = map(int, input().split())
an = [int(input()) for _ in range(m)]

dp = [0 for _ in range(n+1)]
dp[0] = 1
mod = 10**9 + 7

if m == 0:
    dp[0] = 1
    dp[1] = 1
    for i in range(2, n+1):
        dp[i] = (dp[i-1] + dp[i-2]) % mod
    print(dp[n])
    exit()

if an[0] == 1:
    dp[1] = 0
    a = 1
    if len(an) == 1:
        a = 0
else:
    dp[1] = 1
    a = 0

for i in range(2, n+1):
    if i == an[a]:
        dp[i] = 0
        a += 1
        if a == len(an):
            a -= 1
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % mod

print(dp[n])
n = int(input())
s = set()
for i in range(n):
    s.add(str(input()).lower())
print(len(x))



### FIXED CODE ###

n = int(input())
s = set()
for i in range(n):
    s.add(str(input()).lower())
print(len(s))
import itertools
n = int(input())
ns = list(range(1,n+1))
cs = list(itertools.combinations(ns, 2))
top = n if n % 2 == 0 else n-1

for nn in range(n):
  tpl = (nn+1, top-nn)
  if tpl[0] >= tpl[1]:
    break
  #print(f'removing {tpl}')
  cs.remove(tpl)

print(len(cs))
for a, b in cs:
  print(f'{a} {b}')



### FIXED CODE ###

import itertools
n = int(input())
ns = list(range(1,n+1))
cs = list(itertools.combinations(ns, 2))
top = n if n % 2 == 0 else n-1

for nn in range(n):
  tpl = (nn+1, top-nn)
  if tpl[0] >= tpl[1]:
    break
  #print(f'removing {tpl}')
  cs.remove(tpl)

print(len(cs))
for a, b in cs:
  print('{0} {1}'.format(a, b))
A, B, C, D, E, F = map(int, input().split(' '))

max_sugar = 0
max_water = 100*A
max_conc = 0.0
A_limit = F // (100*A)
for i in range(A_limit + 1):
    B_limit = (F-100*A*i) // (100*B)
    for j in range(B_limit + 1):
        if i == 0 and j == 0:
            continue
        sugar_limit = min(E * (A*i+B*j), F-100*(A*i+B*j))

        sugar_ = 0
        for c in range(sugar_limit//C + 1):
            d = (sugar_limit-c*C)//D
            temp_sugar = c*C + d*D
            sugar_ = max(sugar_, temp_sugar)
        temp_conc = sugar_/(sugar_+100*(A*i+B*j))
        if temp_conc > max_conc:
            max_conc = temp_conc
            max_water = 100*(A*i + B*j)
            max_sugar = sugar_
print('{0} {1}'.format(max_water+max_sugar, max_sugar))

### FIXED CODE ###

a=int(input())
b=int(input())
print(a*a-b)
from collections import defaultdict
H,W,M = map(int,input().split())
bomb = [[0]*(W+1) for _ in range(H+1)]
hdic = defaultdict(int)
wdic = defaultdict(int)
for i in range(M):
    hi,wi = map(int,input().split())
    hdic[hi] += 1
    wdic[wi] += 1
    bomb[hi][wi] = 1
hmax = 0
hlist = []
wmax = 0
wlist = []
for i in hdic.keys():
    if hdic[i] > hmax:
        hlist = [i]
        hmax = hdic[i]
    elif hdic[i] == hmax:
        hlist.append(i)
for i in wdic.keys():
    if wdic[i] > wmax:
        wlist = [i]
        wmax = wdic[i]
    elif wdic[i] == wmax:
        wlist.append(i)
for i in hlist:
    for j in wlist:
        if bomb[i][j] == 0:
            print(hmax+wmax)
            exit()
print(hmax+wmax-1)

### FIXED CODE ###

from collections import defaultdict
H,W,M = map(int,input().split())
bomb = [set() for _ in range(H+1)]
hdic = [0]*(H+1)
wdic = [0]*(W+1)
for i in range(M):
    hi,wi = map(int,input().split())
    hdic[hi] += 1
    wdic[wi] += 1
    bomb[hi].add(wi)
hmax = 0
hlist = []
wmax = 0
wlist = []
for i in range(1,H+1):
    if hdic[i] > hmax:
        hlist = [i]
        hmax = hdic[i]
    elif hdic[i] == hmax:
        hlist.append(i)
for i in range(1,W+1):
    if wdic[i] > wmax:
        wlist = [i]
        wmax = wdic[i]
    elif wdic[i] == wmax:
        wlist.append(i)
for i in hlist:
    for j in wlist:
        if j not in bomb[i]:
            print(hmax+wmax)
            exit()
print(hmax+wmax-1)
import math
print(int(input)*2*math.pi)

### FIXED CODE ###

import math
print(int(input())*2*math.pi)
team = [0 for i in range(101)]
point= [[0 for i in range(2)] for i in range(31)]
while 1:
    temp= map(int, raw_input().split(','))
    if temp[0] ==0==temp[1]:
        break
    team[temp[0]]=temp[1]
    if point[temp[1]][1]==0:
        point[temp[1]][1]=1
        for i in range(temp[1]+1):
            point[i][0]+=1
while 1:
    try:
        n = input()
        print point[team[n]][0]
    except EOFerror:
	break

### FIXED CODE ###

team = [0 for i in range(101)]
point= [[0 for i in range(2)] for i in range(31)]
while 1:
    temp= map(int, raw_input().split(','))
    if temp[0] ==0==temp[1]:
        break
    team[temp[0]]=temp[1]
    if point[temp[1]][1]==0:
        point[temp[1]][1]=1
        for i in range(temp[1]+1):
            point[i][0]+=1
while 1:
    try:
        n = input()
        print point[team[n]][0]
    except EOFError:
	break
# coding: utf-8
'''
A = list(map(int,input().split()))
A.sort(reverse = True)
ans = 0
A.append(A[-1])
for i in range(len(A)-1):
    ans +=A[i]-A[i+1]
print(ans)
'''
S = input()
T = input()
f=0
for i in range(len(S)+1):
    if S == T:
        print('Yes')
        f=1
        break
    S = (S[-1]+S)[:-1]
if f==0:
    print('No')

### FIXED CODE ###

# coding: utf-8

A = list(map(int,input().split()))
A.sort(reverse = True)
ans = 0
A.append(A[-1])
for i in range(len(A)-1):
    ans +=A[i]-A[i+1]
print(ans)
#!/usr/bin/python3

def search(n, total, dic):
    if dic[n] >= 0:
        return
    else:
        dic[n] = total
    for i in br[n]:
        search(i, total + 1, dic)

n, u, v = map(int, input().split())
br = {}
disu = {}
disv = {}
for i in range(n):
    br[i + 1] = []
    disu[i + 1] = -1
    disv[i + 1] = -1
for i in range(n - 1):
    a, b = map(int, input().split())
    br[a].append(b)
    br[b].append(a)

search(u, 0, disu)
search(v, 0, disv)
far = 0
for i in range(1, n + 1):
    if disv[i] < disu[i]:
        next
    else:
        far = max(far, disv[i])

print(far - 1)


### FIXED CODE ###

#!/usr/bin/python3
import sys

sys.setrecursionlimit(10 ** 5)

def search(n, total, dic):
    if dic[n] >= 0:
        return
    else:
        dic[n] = total
    for i in br[n]:
        search(i, total + 1, dic)

n, u, v = map(int, input().split())
br = {}
disu = {}
disv = {}
for i in range(n):
    br[i + 1] = []
    disu[i + 1] = -1
    disv[i + 1] = -1
for i in range(n - 1):
    a, b = map(int, input().split())
    br[a].append(b)
    br[b].append(a)

search(u, 0, disu)
search(v, 0, disv)
far = 0
for i in range(1, n + 1):
    if disv[i] < disu[i]:
        continue
    else:
        far = max(far, disv[i])

print(far - 1)
#157b
a=[[int(i) for i in input().split()] for _ in range(3)]
# print("a",a)
# print(a[0][0])
n=int(input())
#print("b:",b)
for i in range(n):
    b=int(input())
	for j in range(3):
		for k in range(3):
			#print("e",e)
			if a[j][k]==b:
				a[j][k]=0
				#print("a:",a)
ans='No'
for i in range(3):
	if a[i][0]==a[i][1]==[i][2]:
		ans='Yes'
	elif a[0][i]==a[1][i]==a[2][i]:
		ans='Yes'
	elif a[0][0]==a[1][1]==a[2][2]:
		ans='Yes'
	elif a[0][2]==a[1][1]==a[2][0]:
		ans='Yes'
print(ans)


### FIXED CODE ###

#157b
a=[[int(i) for i in input().split()] for _ in range(3)]
n=int(input())
for i in range(n):
    b=int(input())
    for j in range(3):
        for k in range(3):
            if a[j][k]==b:
               a[j][k]=0
ans='No'
for i in range(3):
    if a[i][0]==a[i][1]==a[i][2]:
        ans='Yes'
    elif a[0][i]==a[1][i]==a[2][i]:
        ans='Yes'
    elif a[0][0]==a[1][1]==a[2][2]:
        ans='Yes'
    elif a[0][2]==a[1][1]==a[2][0]:
        ans='Yes'
print(ans)
def mark(s, x):
    for i in xrange(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in xrange(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in xrange(0,n) if s[i] and i > 1]

n = input()
tmpn =n
primes = sieve(n/2+1)
# print primes
anslist = []
x = 0
while True:
    if tmpn == 1:
        break
    if tmpn%primes[x]==0:
        anslist.append(primes[x])
        tmpn = tmpn/primes[x]
        x -= 1
    x+=1
# print anslist
ansset = set(anslist)
# print ansset
ans = n
for tmp in ansset:
    ans *= (1-1.0/tmp)
print int(ans)

### FIXED CODE ###

def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n /= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table
n = input()
pdlist = prime_decomposition(n)
pdset = set(pdlist)
if len(pdlist)==1:
    for x in pdset:
        print x-1
else:
    ans = n
    for x in pdset:
        ans *= 1-1.0/x
    print int(ans)
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

n,m=input2()
AB=[[] for _ in range(m)]


for i in range(n):
	a,b=input2()
	if a-1 < m: #報酬受取日がmを超える仕事は除外する
		AB[a-1].append(-b) #heapqの仕様のため，-を追加

ans=0
heap=[]
for i in range(m):
	for b in AB[i]:
		heapq.heappush(heap,b)
	#最大値をheapから取り出し
	if len(heap)>0:
		MAX=heapq.heappop(heap)
		ans+= -MAX
print(ans)

### FIXED CODE ###

from math import factorial as fact
import math
import sys
from itertools import product
import numpy as np
from collections import Counter
import datetime
from collections import deque
from bisect import bisect_left, bisect_right
import heapq



#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))


n,m=input2()
AB=[[] for _ in range(m)]


for i in range(n):
	a,b=input2()
	if a-1 < m: #報酬受取日がmを超える仕事は除外する
		AB[a-1].append(-b) #heapqの仕様のため，-を追加

ans=0
heap=[]
for i in range(m):
	for b in AB[i]:
		heapq.heappush(heap,b)
	#最大値をheapから取り出し
	if len(heap)>0:
		MAX=heapq.heappop(heap)
		ans+= -MAX
print(ans)
import math

A,B,X = input().split()
A = int(A)
B = int(B)
X = math.floor(int(X))
N = 0
tmp = 0
while tmp < X:
    tmp = A * N
    tmp += B * len(str(N))
    N += 1
if A == B:
    N += 1
print(N-2)

### FIXED CODE ###

S = input()
week = ['SUN','MON','TUE','WED','THU','FRI','SAT']
ans = 7 - week.index(S)
print(ans)
import sys
input = sys.stdin.readline

def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))


def main():
    N, M =two_int()

    key_list=[]
    treasures=[]

    for i in range(M):
        mon,_ =two_int()
        key_list.append(mon)
        temp = map(lambda x: 1<<(x-1), many_int())
        sums = sum(temp)
        treasures.append(sums)

    max_index=2**N
    INF=10**15

    dp=[INF for i in range(max_index)]
    dp_i=[set([j for j in range(M)]) for i in range(max_index)]
    dp[0]=0

    for i in range(max_index-1):
        
        lists = list( dp_i[i])
        min_key=0
        for j in lists:
            new_i = int(bin(treasures[j] | i),2)
            cost = dp[i] + key_list[j]
            if dp[new_i] > cost:
                dp[new_i] cost 
                min_key = j
                
        dp_i[i] = dp_i[i] - set([min_key])
        
    goal_index=max_index-1
    if dp[goal_index]!=INF:
        print(dp[goal_index])
    else:
        print(-1)

main()

### FIXED CODE ###

import sys
input = sys.stdin.readline

def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))


def main():
    N, M =two_int()

    key_list=[]
    treasures=[]
    check={}

    for i in range(M):
        mon,_ =two_int()
        temp = map(lambda x: 1<<(x-1), many_int())
        sums = sum(temp)
        
        if sums in check:
            if check[sums] > mon:
                check[sums]=mon
        else:
            check[sums]=mon
            
    for k,v in check.items():
        key_list.append(v)
        treasures.append(k)

    max_index=2**N
    INF=10**15

    dp=[INF for i in range(max_index)]
    dp[0]=0
    M=len(key_list)

    for i in range(max_index-1):
        for j in range(M):
            new_i = int(bin(treasures[j] | i),2)
            cost = dp[i] + key_list[j]
            dp[new_i] = min(dp[new_i], cost) 
        
    goal_index=max_index-1
    if dp[goal_index]!=INF:
        print(dp[goal_index])
    else:
        print(-1)

main()
import sys
N=int(input())
A=list(map(int,input().split()))
A.sort()
for i in range(N):
    if A[i]==A[i+1]:
        print('NO')
        sys.exit()
print('YES')

### FIXED CODE ###

import sys
N=int(input())
A=list(map(int,input().split()))
A.sort()
for i in range(1,N):
    if A[i-1]==A[i]:
        print('NO')
        sys.exit()
print('YES')
def resolve():
    '''
    code here
    '''
    line = input()
    K = int(input())


    base_cnt = 0
    prev = line[0]
    
    if len(line) >=2:
        for item in line[1:]:
            if item == prev:
                base_cnt += 1
                prev = -1
            else:
                prev = item
        
        if line[-1] == line[-2]:
            is_tail_double = True

    res = base_cnt * K
    # print(base_cnt, res)

    if line[0] == line[-1]:
        if not is_tail_double:
            res = base_cnt + (base_cnt + 1) * (K-1)

    if len(line) == 1:
        res = K //2
    
    print(res)

if __name__ == "__main__":
    resolve()


### FIXED CODE ###

def resolve():
    '''
    code here
    Sを先頭　真ん中　お尻の三分割する
    連結した場合を考えると以下の場合分け
    先頭　お尻　真ん中×K　（先頭₊お尻）×（K-1）
    同じ文字が続いたらn//2個の文字変更が必要
    以上で解けるはず

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

    S_head = ''
    head = S[0]
    for s in S:
        if s == head:
            S_head += s
        else:
            break
    
    S_tail = ''
    tail = S[-1]
    for s in S[::-1]:
        if s == tail:
            S_tail += s
        else:
            break
    S_tail = S_tail[::-1]

    S_body = S[len(S_head):-1 * len(S_tail)]
    
    def double_counter(S):
        cnt = 0
        if len(S) >= 2:
            prev = S[0]
            for item in S[1:]:
                if item == prev:
                    cnt += 1
                    prev = -1
                else:
                    prev = item

        return cnt
    
    if len(S) >= 2 and len(S) != len(S_head):
        res = len(S_head)//2\
            + len(S_tail)//2\
            + double_counter(S_body) * K\
            + double_counter(S_tail+S_head) * (K-1)
    elif len(S) == 1:
        res = K // 2
    elif len(S) == len(S_head):
        res = (K * len(S)) // 2

    print(res)

if __name__ == "__main__":
    resolve()
n = list(map(int,input()))[::-1]
n.append(0)
for i in range(len(n)):
	if n[i] >= 6 or (n[i] == 5 and n[i+1] >= 5):
    	n[i] = 10 - n[i]
        n[i+1] += 1
print(sum(n))

### FIXED CODE ###

n = list(map(int,input()))[::-1]
n.append(0)
for i in range(len(n)):
    if n[i] >= 6 or (n[i] == 5 and n[i+1] >= 5):
        n[i] = 10 - n[i]
        n[i+1] += 1
print(sum(n))
n,m=map(int,input().split())
D=list(map(int,input().split(" ")))
answer=-99999999999
 
for i in range(m+1):
    take=i
    trash=m-i
    for j in range(take+1):
        if j>=n:
            goukei=D
        else:
            left=j
            right=j-take
            leftjewel=D[:left]
            rightjewel=D[right:]
            if right==0:
                rightjewel=[]
            goukei=leftjewel+rightjewel
        goukei.sort()
        for i in range(trash):
            if goukei!=[]:
                if goukei[0]<0:
                    del goukei[0]
        if sum(goukei)>answer:
            answer=sum(goukei)
print(answer)
n,m=map(int,input().split())
D=list(map(int,input().split(" ")))
answer=-99999999999

for i in range(m+1):
    take=i
    trash=m-i
    for j in range(take+1):
        if j>=n:
            goukei=D
        else:
            left=j
            right=j-take
            leftjewel=D[:left]
            rightjewel=D[right:]
            if right==0:
                rightjewel=[]
            if left-right>n:
              	rightjewel=D[n-right+1:]
            goukei=leftjewel+rightjewel
        goukei.sort()
        for i in range(trash):
            if goukei!=[]:
                if goukei[0]<0:
                    del goukei[0]
        if sum(goukei)>answer:
            answer=sum(goukei)
print(answer)
提出情報
提出日時

### FIXED CODE ###

import copy

n,m=map(int,input().split())
D=list(map(int,input().split(" ")))
answer=-99999999999
for i in range(m+1):
    take=i
    trash=m-i
    #print("take",take,"trash",trash)
    for j in range(take+1):
        if take>=n:
            #print("A")
            goukei=copy.copy(D)
        else:
            left=j
            right=j-take
            leftjewel=D[:left]
            rightjewel=D[right:]
            if right==0:
                rightjewel=[]
            
            #print("left",left,"right",right,"j",j,"take",take,"trash",trash)
            #print(leftjewel,rightjewel)
            goukei=leftjewel+rightjewel
        goukei.sort()
        for i in range(trash):
            if goukei!=[]:
                if goukei[0]<0:
                    del goukei[0]
        #print("最終",sum(goukei))
        if sum(goukei)>answer:
            #print("更新")
            answer=sum(goukei)
print(answer)
s = input()
t = input()
ls = len(s)
lt = len(t)
dp = [[0] * (lt+1) for _ in range(ls+1)]

for i in range(ls):
    for j in range(lt):
        if s[i] == t[j]:
            dp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j]+1)
        dp[i+1][j+1] = max(dp[i+1][j+1], dp[i+1][j])
        dp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j+1])

#import numpy as np
#print(np.array(dp))

#from collections import deque
#ans = deque()

ans = []
i, j = ls, lt
while i > 0 and j > 0:
    if dp[i][j] == dp[i-1][j]:
        i -= 1
    elif dp[i][j] == dp[i][j-1]:
        j -= 1
    else:
        i -= 1
        j -= 1
        #ans.appendleft(s[i])
        ans = s[i] + ans
#print(''.join(ans))
print(ans)

### FIXED CODE ###

s = input()
t = input()
ls = len(s)
lt = len(t)
dp = [[0] * (lt+1) for _ in range(ls+1)]

for i in range(ls):
    for j in range(lt):
        if s[i] == t[j]:
            dp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j]+1)
        dp[i+1][j+1] = max(dp[i+1][j+1], dp[i+1][j])
        dp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j+1])

#import numpy as np
#print(np.array(dp))

#from collections import deque
#ans = deque()

ans = ''
i, j = ls, lt
while i > 0 and j > 0:
    if dp[i][j] == dp[i-1][j]:
        i -= 1
    elif dp[i][j] == dp[i][j-1]:
        j -= 1
    else:
        i -= 1
        j -= 1
        #ans.appendleft(s[i])
        ans = s[i] + ans
#print(''.join(ans))
print(ans)
s,t =input().split()
a,b = map(int, input().split())
u = input()

print(f'{a} {b}')

# if s == u:
#     a-=1
#     print(f'{a} {b}')
# else:
#     b-=1
#     print(f'{a} {b}')


### FIXED CODE ###

s,t =input().split()
a,b = map(int, input().split())
u = input()


if u == s:
    print(a-1, b)
elif u == t:
    print(a, b-1)
rings = list(map(int, input().split()))
print(sum([rings] - max([rings])))

### FIXED CODE ###

rings = list(map(int, input().split()))
print(sum(rings) - max(rings))
import sys
N,M = map(int,input().split())
ans = [0]*N
dict1 = {}
if  n > 1:
    ans[0] = 1
for x in range(M):
    a,b = map(int,input().split())
    if((a in dict1) != True):
        dict1[a] = b
    elif(a in dict1 and dict1[a] != b):
        print(-1)
        sys.exit()
for k, v in dict1.items():
    ans[k-1] = v
    if(k == 1 and v == 0 and N >= 2):
        print(-1)
        sys.exit()
#print(ans)
l = "".join([str(n) for n in ans])
int_l = int(l)
print(int_l)
#len_l = len(str(int_l))
#print(int_l)

### FIXED CODE ###

import sys
N,M = map(int,input().split())
ans = [0]*N
dict1 = {}
if  N > 1:
    ans[0] = 1
for x in range(M):
    a,b = map(int,input().split())
    if((a in dict1) != True):
        dict1[a] = b
    elif(a in dict1 and dict1[a] != b):
        print(-1)
        sys.exit()
for k, v in dict1.items():
    ans[k-1] = v
    if(k == 1 and v == 0 and N >= 2):
        print(-1)
        sys.exit()
#print(ans)
l = "".join([str(n) for n in ans])
int_l = int(l)
print(int_l)
#len_l = len(str(int_l))
#print(int_l)
str = input()
  if str=='ABC':
    print('ARC')
  else:
    print('ABC)

### FIXED CODE ###

str = input()
if str=='ABC':
  print('ARC')
else:
  print('ABC')
# -*- coding: utf-8 -*-
import math
X = int(input())

B = 1
e = 1.0e-10
while True:
  B5 = pow(B, 5)
  A = math.pow(X + B5, 0.2)
  if(abs(A - int(A)) < e):
    print(int(A), B)
    break

  A = math.pow(X - B5, 0.2)
  if(abs(A-int(A)) < e):
    print(int(A), -B)
    break

  B += 1


### FIXED CODE ###

# -*- coding: utf-8 -*-
import math
import sys

X = int(input())

for A in range(-118, 120):
  for B in range(-119, 119):
    val = math.pow(A, 5) - math.pow(B, 5)
    if(val == X):
      print(A, B)
      sys.exit()
if ("RRR" in S):
  print(3)
elif ("RR" in S):
  print(2)
elif ("R" in S):
  print(1)
else:
  print(0)


### FIXED CODE ###

S = input()
if ("RRR" in S):
  print(3)
elif ("RR" in S):
  print(2)
elif ("R" in S):
  print(1)
else:
  print(0)
x,y,z=map(int,input().split())
n=x//y+1
ans-i
for i in range(1,n+1):
    if i*y+(i-1)*z<=x:
        ans=i
print(ans)

### FIXED CODE ###

x,y,z=map(int,input().split())
n=x//y+1
ans=0
for i in range(1,n+1):
    if i*y+(i+1)*z<=x:
        ans=i
print(ans)
n = int(input())
edges = [[] for _ in range(n)]
costs = [-1]*n
def dfs(current):

    for nex, cost in edges[current]:
        if costs[nex] != -1:
            continue
        costs[nex] = costs[current] + cost
        dfs(nex)

for i in range(n-1):
    a, b, c = map(int,input().split())
    a -= 1
    b -= 1
    edges[a].append((b, c))
    edges[b].append((a, c))

q, k = map(int, input().split())
k -= 1
costs[k] = 0
dfs(k)

res = []
for _ in range(q):
    x, y = map(int, input().split())
    x -= 1
    y -= 1
    res.append(costs[x]+costs[y])

for ans in res:
    print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

n = int(input())
edges = [[] for _ in range(n)]
costs = [-1]*n
def dfs(current):

    for nex, cost in edges[current]:
        if costs[nex] != -1:
            continue
        costs[nex] = costs[current] + cost
        dfs(nex)

for i in range(n-1):
    a, b, c = map(int,input().split())
    a -= 1
    b -= 1
    edges[a].append((b, c))
    edges[b].append((a, c))

q, k = map(int, input().split())
k -= 1
costs[k] = 0
dfs(k)

res = []
for _ in range(q):
    x, y = map(int, input().split())
    x -= 1
    y -= 1
    res.append(costs[x]+costs[y])

for ans in res:
    print(ans)
import numpy as np
n=int(input()) 
d=int(input())
count=0
for i in range(n):
  x=input()
  y=input()
  x=int(x)
  y=int(y)
  dist=np.sqrt((x**2) + (y**2))
  if dist<=d:
    count+=1
print(count) 

### FIXED CODE ###


n,d= input().split(" ")
n=int(n)
d=int(d) 
count=0
for i in range(n):
  x,y= input().split(" ")
  x=int(x)
  y=int(y) 
  dist=((x**2) + (y**2))**0.5
  if dist<=d:
    count+=1
print(count)
a, b=list(map(int, input()))
print((a-1)/(2*b + 1)/1)

### FIXED CODE ###

a, b=list(map(int, input().split()))
print(int((a-1)/(2*b + 1))+1)
a, b = map(int, input().split())

if a < b:
  ans = 'Bob'
elif a == b:
  ans = 'Draw'
else:
  a > b:
    ans = 'Alice'
print(ans)

### FIXED CODE ###

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

if a == 1:
  a += 13
if b == 1:
  b += 13

if a < b:
  ans = 'Bob'
elif a == b:
  ans = 'Draw'
else:
  ans = 'Alice'
print(ans)
D=int(input())
if D==22:
  print(Christmas Eve Eve Eve)
elif D==23:
  print(Christmas Eve Eve)
elif D==24:
  print(Christmas Eve)
else:
  print(Christmas)

### FIXED CODE ###

print('Christmas'+' Eve '*(25-int(input())))