Harryxun/stf_run huggingface dataset:
N,A,B = map(int, input().split())
ten_keta = int(N[0])
one_keta = int(N[1])
ans = 0

for i in range(N+1):
    if ten_keta + one_keta >= A and ten_keta + one_keta <= B:
        ans += i

print(ans)



### FIXED CODE ###

n, a, b = map(int, input().split())
 
sum = 0
for i in range(n+1) :
    count = 0
    for num in str(i) :
        count += int(num)
 
    if (count >= a) and (count <= b) :
        sum += i
            
print(sum)
class Edge():
	def __init__(self, v, w):
		self._v = v
		self._w = w
	def v(self):
		return self._v
	def w(self):
		return self._w

def dfs(v, g, colors, color = 0):
	colors[v] = color
	for nv in g[v]:
		if colors[nv.v()] != -1:
			continue
		nc = color if nv.w() % 2 == 0 else 1 - color
		dfs(nv.v(), g, colors, nc)

def resolve():
	n = int(input())
	colors = [-1]*n
	g = [list() for _ in range(n)]
	for _ in range(n-1):
		u, v, w = map(int, input().split())
		g[v-1].append(Edge(u-1, w))
		g[u-1].append(Edge(v-1, w))
	dfs(0, g, colors)
	for c in colors:
		print(c)
resolve()

### FIXED CODE ###

import sys
sys.setrecursionlimit(100**4)

class Edge():
	def __init__(self, v, w):
		self._v = v
		self._w = w
	def v(self):
		return self._v
	def w(self):
		return self._w

def dfs(v, g, colors, color = 0):
	colors[v] = color
	if not len(g[v]):
		return
	for nv in g[v]:
		if colors[nv.v()] != -1:
			continue
		nc = color if nv.w() % 2 == 0 else 1 - color
		dfs(nv.v(), g, colors, nc)

def resolve():
	n = int(input())
	colors = [-1]*n
	g = [list() for _ in range(n)]
	for _ in range(n-1):
		u, v, w = map(int, input().split())
		g[v-1].append(Edge(u-1, w))
		g[u-1].append(Edge(v-1, w))
	for i in range(n):
		if colors[i] != -1:
			continue
		dfs(i, g, colors)
	for c in colors:
		print(c)
resolve()
a = int(input("A>"))
b = int(input("B>"))
n = int(input("N>"))

if a>0:
    if n-n//(a+b)*(a+b)>a:
        print(n//(a+b)*a+a)
    else:
        print(n//(a+b)*a+n-n//(a+b)*(a+b))
else:
    print(0)


### FIXED CODE ###

n,a, b = map(int, input().split()) 
if a>0:
    if n-n//(a+b)*(a+b)>a:
        print(n//(a+b)*a+a)
    else:
        print(n//(a+b)*a+n-n//(a+b)*(a+b))
else:
    print(0)
n, k = map(int, input().split())
b_list = sorted([list(map(int, input().split())).count(i) for i in range(n+1)],reverse = True)[:k]
print(n-sum(b_list))

### FIXED CODE ###

import collections
n, k = map(int, input().split())
a_list = list(map(int, input().split()))
b = collections.Counter(a_list)
d = b.most_common()[k:]
sum = 0
for i in d:
    sum += i[1]
print(sum)
a, b, k = map(int, input().split())

count=0
for sei in reversed(range(1,max((a,b)))):
    if a%sei==0 and b%sei==0:
        count += 1
        if count == k:
            break

print(sei)

### FIXED CODE ###

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

count=0
for sei in reversed(range(1, max((a,b))+1 )):
    if a%sei==0 and b%sei==0:
        count += 1
        if count == k:
            break

print(sei)
N = int(input())
p = list(map(int,input().split()))
p_sort = sorted(p)
count = 0
for i,j in zip(p,p_sort):
  if p[i] != p[j]:
    count += 1
if count == 0 or count == 2:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

N = int(input())
p = list(map(int,input().split()))
p_sort = sorted(p)
count = 0
for i,j in zip(p,p_sort):
  if i != j:
    count += 1
if count == 0 or count == 2:
  print("YES")
else:
  print("NO")
n,w=int(input()),list(map(int,input().split()))
a=w[0]
for i in w[1:]:a.append(a[-1]+i)
ans=a[-1]
for i in a:
  if ans>max(i,ans-i):ans=a[-1]-i
print(ans)

### FIXED CODE ###

n,w=int(input()),list(map(int,input().split()))
a=[w[0]]
for i in w[1:]:a.append(a[-1]+i)
ans=a[-1]
for i in a:
  if ans>abs((a[-1]-i)-i):ans=abs((a[-1]-i)-i)
print(ans)
import math
ans = 0
n = int(input())
for i in range(1,k+1):
    for j in range(1,k+1):
        for k in range(1,k+1):
            ans += math.gcd(i,math.gcd(j,k))
print(ans)

### FIXED CODE ###

k = int(input())
li=[1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692]
print(li[k-1])
X = int(input())

s = []
for i in range(X+1):
    for j in range(2,X+1):
        if i**j <= X and i**j not in s:
            s.append(i**j)
        if i**j > X:
            break
print(max(s)) 

### FIXED CODE ###

X = int(input())

s = [1]
for i in range(X+1):
    for j in range(2,X+1):
        if i**j <= X and i**j not in s:
            s.append(i**j)
        if i**j > X:
            break
print(max(s))
# coding:utf-8


import numpy as np

strInput = input()
N, A, B = np.array(strInput.split(' ')).astype(int)
lsStrBall = []
while True:
    lsStrBall += ['b'] * A
    lsStrBall += ['r'] * B
    if len(lsStrBall) >= N:
        break

arrStrBall = np.array(lsStrBall)
print((arrStrBall[:N] == 'b').sum())


### FIXED CODE ###

# coding:utf-8


from math import floor

import numpy as np

strInput = input()
N, A, B = np.array(strInput.split(' ')).astype(int)
numGroup = floor(N / (A + B))
numExtendBall = N % (A + B)
if numExtendBall >= A:
    numExtendBlueBall = A
else:
    numExtendBlueBall = numExtendBall
print(numGroup * A + numExtendBlueBall)
import math

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

l = [0]

for x in range(1,100):
    ans = 0
    ans = math.floor(a*x/b) - a * math.floor(x/b)
    l.append(ans)
    if l[x+1] > ans:
        break

print(ans)

### FIXED CODE ###

A,B,N=map(int,input().split())
def f(x):
  return int(A*x/B)-A*int(x/B)

print(f(min(N,B-1)))
n,m=map(int,input().split())
tr=[[] for i in range(n)]
for i in range(m):
  a,b=map(int,input().split())
  if a!=1 and b!=n:
    continue
  tr[a].append(b)
  tr[b].append(a)
for i in range(n):
  if len(tr[i])==2:
    print("POSSIBLE")
    break
else:
  print("IMPOSSIBLE")


### FIXED CODE ###

n,m=map(int,input().split())
tr=[[] for i in range(n+1)]
for i in range(m):
  a,b=map(int,input().split())
  if a!=1 and b!=n:
    continue
  tr[a].append(b)
  tr[b].append(a)
for i in range(2,n):
  if len(tr[i])==2:
    print("POSSIBLE")
    break
else:
  print("IMPOSSIBLE")
def divisors(N):
    U = int(N ** 0.5) + 1
    L = [i for i in range(1, U) if N % i == 0]
    return L + [N // i for i in reversed(L) if N != i * i]

def primes(n):
    memo = [True] * (n + 1)
    i = 2
    while i * i <= n:
        if memo[i]:
            j = i << 1
            while j <= n:
                memo[j] = False
                j += i
        i += 1
    return {i for i in range(n + 1) if memo[i] and i >= 2}

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

if A > B:
    A, B = B, A

D = set(primes(A))
E = {d for d in divisors(A) if B % d == 0}

print(len(D & E) + 1)


### FIXED CODE ###

def divisors(N):
    U = int(N ** 0.5) + 1
    L = [i for i in range(1, U) if N % i == 0]
    return L + [N // i for i in reversed(L) if N != i * i]

def is_prime(N):
    if N < 2 or N % 2 == 0:
        return (N == 2)
    i = 3
    while i * i <= N:
        if N % i == 0:
            return False
        i += 2
    return True

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

if A > B:
    A, B = B, A

D = divisors(A)

ans = 0
for d in D:
    if B % d == 0 and is_prime(d):
        ans += 1

print(ans + 1)
N = input()
numList = input()


for num in numList:
  if num % 2 == 0:
    judge1 = num % 3 == 0
    judge2 = num % 5 == 0
    approve = judge1 or judge2
    if not approve:
      print('DENIED')
      exit()
print('APPROVED')

### FIXED CODE ###

N = input()
numList = input().split(' ')
for num in numList:
  num = int(num)
  if num % 2 == 0:
    judge1 = num % 3 == 0
    judge2 = num % 5 == 0
    approve = judge1 or judge2
    if not approve:
      print('DENIED')
      exit()
print('APPROVED')
import math
def combinations_count(N, r):
    return math.factorial(N) // (math.factorial(N - r) * math.factorial(r))
 
# 整数の入力
N = int(input())
r = 2

print(combinations_count(N, r))

### FIXED CODE ###

# 整数の入力
N = int(input())
 
print((10 ** N - 2* 9 ** N + 8 ** N) % (10 ** 9 + 7))
length = 1
limit = 10 ** 18
for i in range(N):
    length = length *  A[i]
    if length > limit:
        print('-1')
        break
    if i == N-1:
        print(length)


### FIXED CODE ###

def main():
    N = int(input())
    A = list(map(int, input().split()))
    length = 1
    limit = 10 ** 18
    if 0 in A:
        print(0)
        return
    for i in range(N):
        length = length *  A[i]
        if length > limit:
            print('-1')
            return
    print(length)
    return
if __name__ == '__main__':
    main()
x = int(input())
dic = {0: 100, 1:101, 2:102, 3:103, 4:104, 5:105}
global ans
ans = 0
def dfs(i, v):
  global ans
  if v == x:
    ans = 1
    return

  if v > x:
    return
  
  for k in range(6):
    dfs(k, v+dic[k])

  return 

dfs(0, 0)
if ans == 1:
  print(1)
else:
  print(0)

### FIXED CODE ###

x = int(input())
n = x // 100 + 10
for i1 in range(n+1):
  for i2 in range(n+1-i1+1):
    for i3 in range(n+1-i1-i2+1):
      for i4 in range(n+1-i1-i2-i3+1):
        for i5 in range(n+1-i1-i2-i3-i4+1):
          for i6 in range(n+1-i1-i2-i3-i4-i5+1):
            if 100*i1+101*i2+102*i3+103*i4+104*i5+105*i6 == x:
              if i1<=1000000 and i2<=1000000 and i3<=1000000 and i4<=1000000 and i5<=1000000 and i6<=1000000:
                print(1)
                exit()
print(0)
math.pi = pi
r = float(input())
print("{:.010f}{:.010f}".format(r*r*pi,2*r*pi))



### FIXED CODE ###

from math import pi
r = float(input())
print("{:.010f} {:.010f}".format(r * r * pi, 2 * pi * r))
NM = [int(i) for i in input().split(" ")]
A = [int(i) fot i in input().split(" ")]

N = NM[0]
M = NM[1]

if NM => sum(A):
  print(NM-sum(A))
else:
  print(-1)

### FIXED CODE ###

NM = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]

N = NM[0]
M = NM[1]

if N >= sum(A):
  print(N-sum(A))
else:
  print(-1)
N = int(input())
P = list(map(int, input().split()))
answer = []

for i in range(N):
    for j in range(i + 1):
        if P[i] <= P[j]:
            count += 1
    if count == i:
        answer.append(i)
print(answer.count())


### FIXED CODE ###

N = int(input())
P = list(map(int, input().split()))
answer = 0
minimum = P[0]

for i in range(N):
    if P[i] <= minimum:
        answer += 1
    minimum = min(P[i], minimum)
print(answer)
H, W, D=map(int, input().split())
pos={}
for i in range(H):
    A=list(map(int, input().split()))
    for j in range(W):
        pos[A[j]]=(i, j)
Q=int(input())
p=[0 for _ in range(H*W)]
for i in range(D+1,H*W):
    p[i]=p[i-D]+abs(pos[i][0]-pos[i-D][0])+abs(pos[i][1]-pos[i-D][1])
for i in range(Q):
    L, R=map(int, input().split())
    print(p[R]-p[L])


### FIXED CODE ###

H, W, D=map(int, input().split())
pos={}
for i in range(H):
    A=list(map(int, input().split()))
    for j in range(W):
        pos[A[j]]=(i, j)
p=[0]*(H*W+1)
for i in range(D+1,H*W+1):
    p[i]=p[i-D]+abs(pos[i][0]-pos[i-D][0])+abs(pos[i][1]-pos[i-D][1])
Q=int(input())
for _ in range(Q):
    L, R=map(int, input().split())
    print(p[R]-p[L])
a=input()
b=0

for i in a:
  if i==R:
    b+=1
    
  if i==S and b>0:
    b-=1
    
print(b)

### FIXED CODE ###

a = input()
 
if("RRR" in a):
  print("3")
elif("RR" in a):
  print("2")
elif("R" in a):
  print("1")
else:
  print("0")
def calc_lcs(X, Y):
    from array import array
    m = len(X)
    n = len(Y)
    X = ' ' + X
    Y = ' ' + Y
    c = array('I', [0] * (1001 * 1001))
    for i in range(1, m+1):
        for j in range(1, n+1):
            if X[i] == Y[j]:
                c[i*1001 + j] = c[(i-1)*1001 + j - 1] + 1
            elif c[(i-1)*1001 + j] >= c[i*1001 + j - 1]:
                c[i*1001 + j] = c[(i-1)*1001 + j]
            else:
                c[i*1001 + j] = c[i*1001 + j - 1]
    return max(c)


if __name__ == '__main__':
    # ??????????????\???
    # num = int(input())
    f = open('input.txt')
    num = int(f.readline())

    for _ in range(num):
        # X = input()
        # Y = input()
        X = f.readline().strip()
        Y = f.readline().strip()

        # ???????????????
        result = calc_lcs(X, Y)

        # ???????????¨???
        print(result)

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_10_C

最長共通部分列
"""


c = []
def prep_array(X, Y):
    global c
    """ 値が0の2次元配列を用意する。サイズは入力データの最大値を想定して縦横(1000+1)以上必要。 """
    # from array import array
    # c = [array('I', [0] * (len(X)+1)) for _ in range(len(Y)+1)]  #  arrayで用意
    c = [[0]*(len(Y)+2) for _ in range(len(X)+2)] #  リストで用意
    return c


def check_max(array):
    """ 2次元配列の中の最大の値を返す """
    max_lcs = 0
    for row in array:
        temp_max = max(row)
        if temp_max > max_lcs:
            max_lcs = temp_max
    return max_lcs


def calc_lcs4(X, Y, c):
    """
    Y[j]のアクセス方法を変更
    リストの値を一旦変数に保存するように変更
    最長共通部分長を関数内で計算するように変更
    4/5 のテストデータを使用してプロファイリングすると実効時間は 5.6秒
    """
    X = ' ' + X
    Y = ' ' + Y
    m = len(X)
    n = len(Y)
    max_lcs = 0

    pre_row = c[0]
    for i in range(1, m):
        row = c[i]
        XX = X[i]
        for j, YY in enumerate(Y):
            if XX == YY:
                pr_j1 = pre_row[j - 1]
                row[j] = pr_j1 + 1
                if pr_j1+1 > max_lcs:
                   max_lcs = pr_j1 + 1
            else:
                pr_j = pre_row[j]
                r_j1 = row[j-1]
                if pr_j >= r_j1:
                    row[j] = pr_j
                else:
                    row[j] = r_j1
        pre_row = row
    return max_lcs


if __name__ == '__main__':
    # データの入力
    num = int(input())
    #f = open('input.txt')
    #num = int(f.readline())

    for _ in range(num):
        X = input().strip()
        Y = input().strip()

        # 処理の実行
        result = calc_lcs4(X, Y, prep_array(X, Y))

        # 結果の表示
        print(result)
N,D = map(int,input().split())
    P = []
    for i in range (N):
        P.append(list(map(int, input().split())))
    Pi = 0
    for i in range(N):
        for j in range(i+1, N):
            Di = 0
            for k in range (D):
                Di += (P[i][k]-P[j][k])**2
            if int(Di**0.5) == dist**0.5:
                Pi += 1
    print(Pi)

### FIXED CODE ###

N,D = map(int,input().split())
P = []
for i in range (N):
    P.append(list(map(int, input().split())))
Pi = 0
for i in range(N):
    for j in range(i+1, N):
        Di = 0
        for k in range (D):
            Di += (P[i][k]-P[j][k])**2
        if int(Di**0.5) == Di**0.5:
            Pi += 1
print(Pi)
A=input()
B=input()
C=input()
D=input()
print(int(B)-int(C) if C<B else "0")

### FIXED CODE ###

A,B,C,D = map(int, input().split())
x=min(B,D)-max(A,C)
if x>0:
    print(x)
else:
    print("0")
n, k = map(int, input().split())
As = list(map(int, input().split()))

idx = As.index(i)
left = idx
right = n - idx - 1

n_l = (left + k - 1) // (k - 1)
n_r = (right + k - 1) // (k - 1)

print(n_l + n_r)

### FIXED CODE ###

n, k = map(int, input().split())
As = list(map(int, input().split()))

idx = As.index(min(As))
left = idx

n_l = (left + k - 2) // (k - 1)

right = n - ((n_l) * (k-1)) - 1

n_r = (right + k - 2) // (k - 1)

print(n_l + n_r)
n=int(input())
lr=[list(map(int,input().split())) for i in range(n)]
ans=0
for i in lr:
  ans += r-l+1
print(ans)

### FIXED CODE ###

n=int(input())
lr=[list(map(int,input().split())) for i in range(n)]
ans=0
for i in lr:
  ans += i[1]-i[0]+1
print(ans)
n = int(input())
a = list(map(int, input().split()))
r = [0] * 9
for i in a:
    r[i//400] += 1

if sum([1 for i in r[:-1] if i != 0]) == 0:
    print(1, min(8, n))
else:
    mi = sum([1 for i in r[:-1] if i != 0])
    res = 8 - mi
    if res == 0:
        print(mi, mi)
    else:
        if res > r[-1]:
            print(mi, mi+r[-1])
        else:
            print(mi, mi+res)

### FIXED CODE ###

from bisect import bisect_right

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

r = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
c = [0] * 9

for score in a:
	i = bisect_right(r, score)
	c[i] += 1

ans = 8 - c[:-1].count(0)

print(max(1, ans), ans + c[8])
P, Q, R = map(int, input().split())

list = [P, Q, R]
min1 = min(list)
list.pop(min1)
min2 = min(list)
print(min1 + min2)

### FIXED CODE ###

P, Q, R = map(int, input().split())

list = [P, Q, R]
min1 = min(list)
list.remove(min1)
min2 = min(list)
print(min1 + min2)
s = input()

for i in range(len(s)-2):
  dif = []
  dif.join(abs(int(s[x:y])-753))

print(min(dif))

### FIXED CODE ###

s = input()
dif = []
x = 0
y = 3 
for i in range(len(s)-2):
    dif.append(abs(int(s[x:y])-753))
    x += 1
    y += 1
 
print(min(dif))
N,T=map(int,input().split())
ct=[tuple(map(int,input().split())) for i in range(n)]
ans=10**9
for c,t in ct:
    if T<t:
        continue
    else:
        ans=min(ans,c)
print(ans if ans!=10**9 else 'TLE')


### FIXED CODE ###

N,T=map(int,input().split())
ct=[tuple(map(int,input().split())) for i in range(N)]
ans=10**9
for c,t in ct:
    if T<t:
        continue
    else:
        ans=min(ans,c)
print(ans if ans!=10**9 else 'TLE')
N, x = map(int, input().split())
a_list = list(map(int, input().split()))
ex_list = a_list.copy()
ex_list.extend(a_list)

ans = float("inf")
for i in range(N):
    cost = 0
    for j in range(N):
        cost += min(ex_list[N-i+j:N+1+j])

    cost += x * i
    ans = min(ans, cost)
print(ans)


### FIXED CODE ###

N, x = map(int, input().split())
a_list = list(map(int, input().split()))
ex_list = a_list.copy()
ex_list.extend(a_list)

ans = float("inf")
cost_list = [float("inf") for _ in range(N)]
for i in range(N):
    cost = 0
    for j in range(N):
        if i == 0:
            cost += ex_list[N + j]
            cost_list[j] = ex_list[N + j]
        else:
            tmp = cost_list[j]
            if tmp > ex_list[N - i + j]:
                cost_list[j] = ex_list[N - i + j]
                cost += ex_list[N - i + j]
            else:
                cost += tmp

    cost += x * i
    ans = min(ans, cost)
print(ans)
N = int(input())
all_point_list = [input().split() for _ in range(N)]
for each_list in all_point_list:
    each_list[1] = int(each_list[1])
sorted_all_list = sorted(all_point_list)
for sorted_point in sorted_all_list:
    print(all_point_list.index(sorted_point+1))

### FIXED CODE ###

N = int(input())
all_point_list = [input().split() for _ in range(N)]
for each_list in all_point_list:
    each_list[1] = int(each_list[1])
sorted_all_list = sorted(all_point_list, key=lambda x:(x[0], -x[1]))
for sorted_point in sorted_all_list:
    print(all_point_list.index(sorted_point) + 1)
n,m=map(int,input().split())

if abs(n-m)>=2:
    ans=0
else:
    check=1
    check2=1
    while n >=1:
        check *= n
        n-=1
    while m>=1:
        check2 *=m
        m-=1
    ans=check*check2
print(ans if check !=check2 else ans*2)

### FIXED CODE ###

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

if abs(n-m)>=2:
    ans=0
else:
    nn=math.factorial(n)
    mm=math.factorial(m)
    ans = nn*mm
print(0 if ans==0 else ans%(10**9+7) if nn !=mm else (ans*2)%(10**9+7))
a,b,c=map(int,input().split())
print("YES" if (b-a==c-b) else "NO)

### FIXED CODE ###

a,b,c=map(int,input().split())
print("YES" if (b-a==c-b) else "NO")
s = str(input())
if s = "RRR":
  print(3)
if s = "RRS" and s = "SRR":
  print(2)
if s = "RSS" and s = "SRS" and s = "SSR" and s = "RSR":
  print(1)
if s = "SSS":
  print(0)

### FIXED CODE ###

s = input()
if s == "RRR":
  print(3)
if s == "SSS":
  print(0)
if s == "RRS":
  print(2)
if s == "SRR":
  print(2)
if s == "RSS":
  print(1)
if s == "SRS":
  print(1)
if s == "SSR":
  print(1)
if s == "RSR":
  print(1)
import fractions
N = int(input())
A = list(map(int,input().split()))
minflg = 0
mingcd = A[1]
for i in range(N):
    gcd = fractions.gcd(mingcd,A[i])
    if gcd < mingcd:
        mingcd = gcd
        minflg = i
if minflg == 0 and N > 2:
    if fractions.gcd(A[0],A[2]) > math.fractions(A[1],A[2]):
        minflg = 1
if minflg > 0:
    mingcd = A[minflg-1]
else: mingcd = A[minflg+1]
    
for i in range(N):
    if i != minflg:
        gcd = fractions.gcd(mingcd,A[i])
        if gcd < mingcd:
            mingcd = gcd
print(mingcd)
    

### FIXED CODE ###

from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
if N == 2:
    ans = max(A)
else:
    GCDF, GCDB = [0]*N, [0]*N
    GCDF[1],GCDB[-2] = A[0], A[N-1]
    for i in range(2, N):
        GCDF[i] = gcd(GCDF[i-1],A[i-1])
        GCDB[-(i+1)] = gcd(GCDB[-i], A[-i])
    GCDm = [0]*N
    GCDm[0] = GCDB[0]
    GCDm[N-1] = GCDF[N-1]
    for i in range(1, N-1):
        GCDm[i] = gcd(GCDF[i],GCDB[i])
    ans = max(GCDm)
print(ans)
x =  int(input())[-1]

if x == [2,4,5,7,9]:
    print("hon")

elif x == [0,1,6,8]:
    print("pon")

else:
    print("bon")

### FIXED CODE ###

x = int(input()[-1])

if x in [2,4,5,7,9]:
    print("hon")

elif x in [0,1,6,8]:
    print("pon")

else:
    print("bon")
n=int(input())
d=map(int,input().split(" "))
wa=[]
for i in range(1,n+1):
  for j in range(i,n+1):
    wa.append(d[i]*d[j])
print(sum(wa))

### FIXED CODE ###

n=int(input())
d=list(map(int,input().split(" ")))
wa=[]
for i in range(0,n):
  for j in range(i+1,n):
    wa.append(d[i]*d[j])

print(sum(wa))
import sys
def l(s,n):
    o=ord(s)+n
    if not 97<=ord(s)<=122:
        return s
    if 97<=o<=122:
        return chr(o)
    elif o>123:
        return chr(o-26)

for t in sys.stdin:
    s=t[:-1]
    for i in range(1,26):
        e=lambda s:l(s,i)
        if "".join(map(e,"this")) in s:
            break
        if "".join(map(e,"that")) in s:
            break
        if "".join(map(e,"the")) in s:
            break
    print("".join(map(lambda x:l(x,-i),s)))



### FIXED CODE ###

import sys
def l(s,n):
    o=ord(s.lower())
    if not 97<=o<=122:
        return s
    if 97<=o+n<=122:
        if 97<=ord(s)<=122:
            return chr(o+n)
        else:
            return chr(o+n).upper()
    elif o+n>122:
        if 97<=ord(s)<=122:
            return chr(o+n-26)
        else:
            return chr(o+n-26).upper()
    else:
        if 97<=ord(s)<=122:
            return chr(o+n+26)
        else:
            return chr(o+n+26).upper()

for t in sys.stdin:
    s=t[:-1]
    u=s.lower()
    for i in range(0,26):
        cv=lambda y:"".join(map(lambda x:l(x,i),y))
        if cv("this") in u or cv("that") in u or cv("the") in u:
            break
    print("".join(map(lambda x:l(x,-i),s)))