peterverebics/CodeNet_Python_118 huggingface dataset:
s = input()
s = list(s)
streak = 0
max_streak = 0
for i in s:
  if s == "R":
    streak += 1
    max_streak = max(streak, max_streak)
  else:
    streak = 0
print(streak)
s = input()
maxCount = 0
count = 0

for i in s:
  if(i == 'R'):
    count += 1
  else:
    maxCount = max(count, maxCount)
    count = 0
    
print(maxCount)
s=input()
ans=0
rain=[0]
for i in range(len(s)):
    if s[i]=="R":
        ans+=1
    else:
        rain.append(ans)
        ans=0
print(max(rain))
S = list(input())

count = 0
buffer = 'R'
for s in S:
    if s == 'R' and buffer == 'R':
        count += 1
    elif s == 'S':
        buffer = 'S'
print(count)
X=str(input())
if X=='RRR':
    print(3)
elif X=='RRS' or X=='SRR':
    print(2)
elif X=='SSS':
    print(0)
S = input()
count = 0
for i in range(3):
    if S[i] == "R":
        count += 1
    elif count == 1:
        count = 0
    
print(count)
s = input()
ans = 0
t = 0
for i in s:
  if(i=='R'):
    t += 1
  else:
    ans = t
    t = 0
print(ans)
cnt = 0
t = list(input())
for i in range(len(t)):
    if "R" * i in t:
        cnt = i + 1
print(cnt)
s=input()
ans=0
if s[1]=="S":
    if s[0]=="R" or s[2]=="R":
        print(1)
    else:
        print(0)
else:
    if s[0]!="R" or s[2]!="R":
        print(2)
    else:
        print(3)
tenki = input()

if tenki == "RRR":
    print(3)
elif tenki == "RRS" or tenki[1:3] == "SRR":
    print(2)
elif tenki == "RSS" or tenki == "SRS" or tenki == "SSR":
    print(1)
else:
    print(0)
t = input()
rain = 0
for i in t:
  if i == 'R':
    rain +=1
print(rain)
def fun(a):
    count=0
    max=0
    for i in a:
        if i=='R':
            count+=1
        
            if count>=max:
                max=count
            
    else:
        if count>=max:
            max=count
        count=0
    return max
elem = input()
single = elem.count("R")
double = elem.count("RR")
triple = elem.count("RRR")
if triple == 1:
    print(3)
elif double == 1:
    print(2)
else:
    if single == 1:
        print(1)
    else:
        print(0)
S = input()

a="RR"
b="RRR"
c="SSS"

if a in S:
    print(2)

elif b == S:
    print(3)
    
elif c == S:
    print(0)

else:
    print(1)
s = list(input())
l = len(s)
rain =int()
for x in range(l):
  if s[x]=="R":
    rain=rain+1
  else:
    if rain==0:
      rain=0
    else:
      rain=rain
print(rain)
str = input()
r = 0
for c in str:
	if c == "R":
		r += 1
print(r)
s = input()
cnt = 0

for i in s:
  if i == "R":
    cnt += 1
    
print(cnt)
a=input()

if 'RR' in a:
    print("2")
elif 'R' in a:
    print("1")
elif 'RRR' in a:
    print('3')
else:
    print("0")
i = 0
for s in input():
    if s == "R":
        i += 1

print(i)
sr_list = list(input().split())
r_count = sr_list.count('R')
if r_count == 0:
  print('0')
elif r_count == 1:
  print('1')
elif r_count ==3:
  print('3')
else:
  if sr_list[1] == 'S':
    print('1')
  else:
    print('2')
a = input()
if a == "RRR":
  print(3)
elif a in "RR":
  print(2)
elif a == "SSS":
  print(0)
else:
  print(1)
s = input()
ans = 0

if 'RRR' in s:
  ans == 3
elif 'RR' in s:
  ans = 2
elif 'R' in s:
  ans = 1
else:
  ans = 0

print(str(ans))
S = input()

# 高々2^3=8通りなので、全て考慮すればよい
ans = 0
if S == 'RRR': ans = 3
elif S == 'SRR' and S =='RSR' and S == 'RRS': ans = 2
elif S == 'SSS': ans = 0
else: ans = 1
  
print(ans)
# coding: utf-8
# Your code here!

S = input()
#N = int(input())
#A, B = map(int, input().split())
#List = list(map(int, input().split()))

if S=="RRR":
    print(3)
elif S=="SSS":
    print(3)
elif S=="RSS":
    print(2)
elif S=="RRS":
    print(2)
elif S=="SRR":
    print(2)
elif S=="SSR":
    print(2)
else:
    print(1)
S = list(input())
a = 0
ans = 0
for i in range(3):
    if S[i] == 'R':
        a += 1
    else:
        if ans < a:
            ans = a
        a = 0
print(ans)
text = input()
if text[1] == "S":
    if text[0] == "R" or text[2] == "R":
        print(1)
    else:
        print(0)
else:
    if text[0] == "R" and text[2] == "R":
        print(3)
    elif text[0] == "R" or text[2] == "R":
        print(2)
s = input()
cnt = 0
if s[0] == s[1] and s[1] == s[2] and s[1] =='R':
    print('3')
elif s[0] == s[1] or s[1] == s[2] and s[1]=='R':
    print('2')
elif s[0] == 'R' or s[1] =='R' or s[2] == 'R':
    print('1')
else:
    print('0')
S = input()

day = 0
counter = 0

for i in S:
    counter += 1
    if i == 'S':
        if counter == 2:
            day = 0
        pass
    elif i == 'R':
        day += 1

print(day)
S = input()
if S[0] == 'R':
  if S[1] == 'R':
    if S[2] == 'R':
      print("3")
    else:
      print("2")
  else:
    print("1")
else:
  print("0")
S = input()

if S =="SSS":
  print(0)
elif S[1] == "S":
  print(1)
elif S == "RRR":
  print(3)
else:
  print(2)
s = input()
ans=0
for i in range(len(s)):
  if s[i] == "S":
    ans+=1
  elif i>len(s):
    break
    
print(ans)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    S = input()
    mx = 0
    cnt = 0
    pre = 'R'
    for i in range(len(S)): 
        if (S[i] == 'R') and (pre == 'R'):
            cnt += 1
        else:
            cnt = 0
            pre = 'S'
        mx = max(cnt, mx)
    print(mx)
if __name__ == '__main__':
    main()
S = input()
if (S == 'SSS'):
  print(0)
if (S == 'SSR'):
  print(1)
if (S == 'SRS'):
  print(1)
if (S == 'SRR'):
	print(2)
if (S == 'RSS'):
  print(1)
if (S == 'RSR'):
  print(2)
if (S == 'RRS'):
  print(2)
if (S == 'RRR'):
	print(3)
a=input()
b=0
count=0
for i in range(0,len(a)-1):
    if a[i]=='R' and a[i+1]=='R':
        count+=1
    if a[i]=='R' and a[i+1]!='R':
        count+=1
        b=max(b,count)
        count=0
print(b)
S = list(map(str, input()[0:3]))
res = 0
for i in S:
    if i == "R":
        res += 1
print(res)
##175
##A - Rainy Season
S = str(input())
if "R" in S:
    if S[1] == "S":
        print(1)
    else:
        if S[0] == "R" and S[2] == "R":
            print(3)
        else:
            print(2)
    
else:
    print(0)
S=str(input())
if S[1]=="R":
  if S[2]=="R" and S[0]=="R":
    print(3)
  else:
    if S[0]=="R":
      print(2)
    if S[2]=="R":
      print(2)
    else:
      print(1)
else:
  if S[2]=="R" or S[0]=="R":
    print(1)
  else:
    print(0)
def main():
    from sys import setrecursionlimit, stdin, stderr
    from os import environ
    from collections import defaultdict, deque, Counter
    from math import ceil, floor
    from itertools import accumulate, combinations, combinations_with_replacement
    setrecursionlimit(10**6)
    dbg = (lambda *something: stderr.write("\033[92m{}\033[0m".format(str(something)+'\n'))) if 'TERM_PROGRAM' in environ else lambda *x: 0
    input = lambda: stdin.readline().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    P = 10**9+7
    INF = 10**18+10

    print(Counter(input())['R'])

    
main()
S = input("R or S:")
s = list(S)

count = 0
for i in s:
    if i == "R":
        count += 1
    else: count =0
print(count)
s=input()

if s == 'RRR':
    print(3)
elif s.count('RR') == 1:
    print(2)
elif s.count('R') > 1:
    print(1)
else:
    print(0)
S=input()
string1 = 'R'
string2 = 'RR'
if S.count(string1) == 0:
    print('0')
if S.count(string1) == 1 or S == 'RSR':
    print('1')
if S.count(string2) == 1:
    print('2')
if S.count(string1) == 3:
    print('3')
s = input()
if s[0]=='R' and (s[0]==s[1]):
  print(2)
elif s[1]=='R' and (s[1]==s[2]):
  print(2)
elif s[0]=='R' and s[0]==s[1]==s[2]:
  print(3)
elif s[0]=='R' or s[1]=='R' or s[2]=='R':
  print(1)
else:
  print(0)
# -*- coding: utf-8 -*-
S = input()
ans = 0
for i in range(len(S)):
  if i > 0:
    if S[i-1] == S[i] == "R":
      ans += 1
    
  elif S[i] == "R":
    ans += 1
print(ans)
s=input()
c=0
ans=0
for i in range(len(s)):
  if(s[i]=='R'):
    c+=1
  else:
    ans=max(ans,c)
if(c):    
  ans=max(ans,c)
print(ans)
S = input()
cnt = 0
for i in range(3):
    if S[i] == "R":
        cnt += 1
print(cnt)
S = input()

if (S[0] == 'R' and S[1] == 'R') or (S[1] == 'R' and S[2] == 'R'):
    print(2)
elif S == 'SSS':
    print(0)
elif S == 'RRR':
    print(3)
else:
    print(1)
I=input()
count = 0
if I[0] == "R":
  if I [1] == "R":
    if I[2] == "R":
      print(3)
    else:
      print(2)
  else:
    print(1)
else:
  if I[1] == "S":
    if I[2] == "S": print(2)
    else:
      print(1)
  else:
    print(0)
s = input()
a = 0
for i in range(3):
    if s[i] == 'R':
        a += 1
    else:
        break
print(a)
s = input()
ans = 0
if s[0]  == "R":
    ans += 1
    if s[1] == "R":
        ans += 1
        if s[2] == "R":
            ans += 1

print(ans)
user_input = input().upper()
store = []
for i in user_input:
    store.append(i)
st_nd = store[0:2]
# print(st_nd)
nd_rd = store[1:3]
# print(nd_rd)
if len(set(store)) == 1:
    for i in set(store):
        if i == "S":
            print(0)
        else:
            print(3)
elif len(set(st_nd)) == 1:
    print(2)
elif len(set(nd_rd)) == 1:
    print(2)
else:
    print(1)
weather = input()

if len(weather) != 3:
    print("0")
if weather in ["RRR"]:
    print("3")
elif weather in ["SRR","RSR","RRS"]:
    print("2")
elif weather in ["SSR","SRS","RSS"]:
    print("1")
else:
    print("0")
S = input()
max = 0
i = 0
m = 0
while(i != len(S)):
  if S[i] == "R":
    m += 1
  
  else:
    max = m
    m = 0
    break
  i += 1

print(max)
s=input()
if s=="RRR":
	print(3)
elif s=="RRS"or"SRR":
	print(2)
elif s=="SSR"or"SRS"or"RSS":
	print(1)
else:
	print(0)
weather = input()

raining = False
count = 0
max = 0
for w in weather:
    if w == 'R':
        if not raining:
            raining = True
            count = 1
        else:
            count += 1
        if max < count:
            max = count
    elif w == 'S':
        raining = False
        count = 0
S = input()
if S == "RRR":
  print("3")
if S == "RRS" or "SRR":
  print("2")
if S == "SSS":
  print("0")
else:
  print("1")
S = input()

if S == "RRR":
    print(3)
elif S == "RRS":
    print(2)
elif S == "RSR":
    print(1)
elif S == "SRR":
    print(2)
else:
    print(0)
from collections import Counter
import copy
from itertools import combinations


def A(s):
  l = 0
  max_l = 0
  for i in range(len(s)):
    if i == 0 and s[i] == 'R':
      l += 1
    elif s[i - 1] == s[i] and s[i] == 'R':
      l += 1
    else:
      l = 0
    if l > max_l:
      max_l = l
  return max_l


def B():
  pass


def C():
  pass


def main():
  s = input()
  print(A(s))


if __name__ == '__main__':
  main()
s = input()

if s[1] == 'S':
  if 'R' in s:
    print(1)
  else:
    print(0)
else:
  if s[0] == 'R' or s[2] == 'R':
    if 'S' in s:
      print(2)
    else:
      print(3)
string=input()

r=0
for i in range(len(string)):
  if string[i]=='R':
    r+=1
print(r)
# coding: utf-8
# Your code here!

s = input()
num = 0
if s[0] == "R": num+=1
if s[1] == "R": num+=1
if s[2] == "R": num+=1
print(num)
s=input()

a=s.count("R")

if s[0]==s[1] or s[1]==s[2]:
  if a==2:
    print(2)
  
else:
  print(1)
  
if a==3:
  print(3)
  
elif a==1:
  print(1)
  
elif a==0:
  print(0)
s=input()
ans=0
for i in s:
  if i=="R":
    ans+=1
print(ans)
s=input()

ans=0
if s[0]=="R":
    ans+=1
    if s[1]=="R":
        ans+=1
        if s[2]=="R":
            ans+=1

anss=0
if s[1]=="R":
    anss+=1
    if s[2]=="R":
        anss+=1

if ans<anss:
    print(anss)
else:
    print(ans)
s=input()
if ("RRR" in s):
  print(3)
if ("RR" in s):
  print(2)
if ("R" in s):
  print(3)
print(0)
s = str(input())
if s == 'RRR':
    print(3)
elif s == 'SSS':
    print(0)
elif s[0:] == 'RR' or s[:-1] == 'RR':
    print(2)
else:
    print(1)
s = input()
ans = 0

if s[0] == "R":
    ans += 1
    if s[1] == "R":
        ans += 1
    else:
        ans = 0
        if s[2] == "R":
            ans += 1
        else:
            ans = 0

print(ans)
s = input()

if s[0] == s[1] == s[2] == 'R':
    print(3)
elif s[0] == s[1] == 'R' or s[1] == s[2] == 'R':
    print(2)
elif s[0] == 'R' or s[0] == 'R' or s[0] == 'R':
    print(1)
else:
    print(0)
s = input().rstrip()
if "SSS" in s:
    print(3)
elif "SS" in s:
    print(2)
elif "S" in s:
    print(1)
else:
    print(0)
a = input()
b = 0
c = 'R'
for i in a:
  if i == 'R' and c == 'R':
    b = b + 1
  elif i == 'S':
    c == 'R'
  else:
    c == 'S'
print(b)
S = input()


if S[1] == "S":
    if S[0] == "R" or S[2] == "R":
        print(1)
    else:
        print(0)
else:
    if S[0] == "R" and S[2] == "R":
        print(3)
    if S[0] == "R" or S[2] == "R":
        print(2)
    else:
        print(1)
S = list(input())
count = 0
ans = 0
for w in S:
    if w == 'R':
        count += 1
    else:
        ans = count
        count = 0
print(ans) if count < ans else print(count)
RS = input()
answer = 0

for i, j in enumerate(RS):
  if j == "R":
    answer += 1
  elif (i == 2 and j == "S") or (i == 1 and j == "S"):
    break
  else:
    answer = 0
print(answer)
S=input()
set_S=set(S)
if len(set_S)==1:
    ret=S.count('R')
else:
    if S[0]==S[1]=='R' or S[1]==S[2]=='R':
        ret=2
    else:
        ret=S.count('R')-1
print(ret)
S = input()

day = 0

for i in S:
    if i == 'S':
        pass
    elif i == 'R':
        day += 1

print(day)
S = input()
S = list(S)

cnt = 1

if S[0]=='R' and S[1]=='R':
    cnt =2

if S[1]=='R' and S[2]=='R':
    cnt = 2

if S.count('R') == 0:
    cnt = 0

print(cnt)
S = list(input())
RD = S.count('R')
if RD != 2:
    print(RD)
else:
    if S[1] == 'R':
        print(RD and 'bbb')
    else:
        print(1)
A = input("晴れならs,雨ならrを入力してください")
if A == "sss":
	print(0)
elif A == "rrr":
  print(3)  
elif A ==  "srr" or A == "rrs":
  print(2)
else:
  print(1)
s = input()

if s == 'R':
  print(3)
elif s[:3] == "RR" or s[1:] == "RR":
  print(2)
elif 'R' in s:
  print(1)
else:
  print(0)
tenki = list(input())
ans = 0
max_ans = 0
for i in tenki:
  if i == "R":
    ans = ans + 1
    flag = 0
  else:
    flag = 1
  if flag == 1:
    max_ans = ans
    ans = 0 
if max_ans > ans:
  print(max_ans)
else:
  print(ans)
s = list(input())
cnt = 0
old = "*"
for i in range(len(s)):
  if s[i] == "R":
    if old == "R":
      cnt += 1
    else:
      cnt = 1
    old = s[i]
print(cnt)
mozi = input()
if mozi == 'RRR':
    print(0)
elif mozi == 'RRS':
    print(2)
elif mozi == 'SSR':
    print(2)
elif mozi == 'SRS':
    print(1)
elif mozi == 'SSR':
    print(1)
elif mozi == 'RSS':
    print(1)
else:
    print(0)
S = list(input())
X = 0
if S[1] == "R":
    if S[0] == S[1] or S[1] == S[2]:
        if S[0] == "R" and S[2] == "R":
            X = 2
        else:
            X = 1
print(X)
D = list(input().strip().split())

ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    ans = 0
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
    elif D[i] == 'S':
      ans_list.append(ans)
      continue
elif D.count("R") < 1:
  print(0)
S = input()
a = 0
for i in S:
    if i == 'R':
        a += 1
if a == 2:
    if S[1] == S:
        a == 1
print(a)
S = input()

if S == 'SSS':
  print(0)
if S == 'RRR':
  print(3)
if S == 'SRR' or S == 'RRS':
  print(2)
else:
  print(1)
S = input()[0:3]
res = 0

if S[0] == "R" and S[1] == "R" and S[2] == "R":
    res = 3
elif S[0] == "R" and S[1] == "R":
    res = 2
elif S[0] == "R":
    res = 1
print(res)
s = input()
def solve(s):
  if not s:
    return 0
  d = 0
  res = 0
  for i in s:
    if i == 'R':
      d += 1
    else:
      res = max(res, d)
      d = 0
  return res
solve(s)
def main():
    S = list(input())
    ans = 0
    mae = False
    if S[0] == "R":
        mae =True
    for i in range(len(S)):
        if S[i] == "R":
            if mae:
                ans += 1
                mae = True
        else:
            mae = False
        


    return ans

if __name__ == '__main__':
    print(main())
n = list(input())
result = 0
for i in range(1, len(n)):
    if n[i] == n[i-1]:
        result += 1
    else:
        if n[i] == "R":
            result = 1
print(result)
S = input()

row_now = 0
row_max = 0
for day in S:
    if day == "S":
        row_now += 1
    else:
        row_now = 0
    if row_now > row_max:
        row_max = row_now

print(row_max)
S = input()
if S=="SSS":
    print(0)
elif S =="SSR"or S == "SRS" or S == "RSS" or S == "RSR":
    print(1)
elif S =="RRS" or "SRR":
    print(2)
else:
    print(3)
n = str(input())

cnt = 0

for i in range(2):
    if n[i] == 'R':
        cnt += 1
if cnt == 2 and n[i] == 'S':
    print(1)
    exit(0)
print(cnt)
l = list(input())
a = 0
for v in l:
    if v == 'R':
        a += 1
        
print(a)
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def solve():
    return

if __name__=='__main__':
    s = S()
    if s=="RRR":
        print(3)
    elif s=="RRS" or "SRR":
        print(2)
    elif s=="SSS":
        print(0)
    else:
        print(1)
    solve()
s = input()
ans = 0

for i in s:
  if i == 'R':
    ans +=1

print(ans)
S=input()

cnt=0
max_cnt=0
for s in S:
    if(s=="R"):
        cnt+=1
    else:
        max_cnt=cnt
        cnt=0

if(S.count("R")==3):
    print(cnt)
else:
    print(max_cnt)
S = list(input())
S.append("")
N = len(S)
#X = [[0] for i in range(N+1)]
ans = 0
i = 0
while i < N:
#for i in range(N-1):
    if S[i]=="R":
        ans += 1
        if S[i]==S[i+1]:
            ans += 1
            i += 1
    i += 1
print(ans)
s = input()
x = 0
ans = 0

for w in s:
    if w == 'R':
        ans += 1
    else:
        x = ans
        ans = 0

print(max(x, ans))
s = input()
res = 0
 
if s[0] == s[1]:
  res += 1
if s[1] == s[2]:
  res += 1
 
print(res)
S = str(input())
if S == "SSS":
    print(0)
elif S == "SSR"or"SRS"or"RSS"or"RSR":
    print(1)
elif S == "SRR"or"RRS":
    print(2)
elif S == "RRR":
    print(3)
weather = input()
weather = list(weather)
r = 0

for i in range(len(weather)-1):
    if(weather[i] == "R"):
        r += 1
        if(weather[i] == weather[i+1]):
            r += 1
if(r != 1):
    r -= 1

print(r)
S = input()

day = 0

for i in S:
    if i == 'S':
        pass
    else:
        day += 1

print(day)
S = input()
count = 0
if S[0] == 'R':
    count += 1
for i in range(1, len(S)):
    if S[i] == 'R':
        if S[i-1] == 'R':
            count += 1
print(count)
s=input()
if s[0]=="R":
	if s[0]=="R" and s[1]=="R" and s[2]=="R":
		print(3)
	elif s[0]=="R" and s[1]=="R":
		print(2)
	elif s[0]=="R":
		print(1)
else:
	print(0)
s=input()
l=list(s)
c=0
for i in range(len(l)):
  if l[i]=='S':
    c=0
  else:
    c+=1
print(c)
S = input()
lst = list(S)
r_count = lst.count("R")

if r_count == 1 or r_count == 3:
  print(r_count)
else:
  if lst[1] != "S":
    print(2)
  else:
    print(1)
import sys, math


if(__name__ == "__main__"):
    SSS =  input()
    if(SSS=="RRR" ):
        print(3)
    elif("RR" in SSS):
        print(2)
    else:
        print(1)
S = list(input())
if ("S" not in S):
    print(3)
elif ("R" in S):
    if (S[1] == "S"):
        print(1)
    else:
        print(2)
else:
    print(0)
s=input()
a=s[0]
b=s[1]
c=s[2]
if a==b==c:
  print(0)
elif a==b or b==c:
  print(2)
else:
  print(1)
s = input()
print(max([s.count('R'), s.count('RR'), s.count('RRR')]))
if __name__ == '__main__':
    s = input()
    print(s.count("R"))
input_line = input()
#print(input_line)
charlist = list(input_line)
index = 0
for i in range(3):
    if(charlist[i]=="R"):
        index += 1
    
if index==2:
    if charlist[1]=="S":
        print(1)
        
else:
    print(index)
n = input()
if n[:2] == "RR" or n[2:] == "RR":
    print("2")
elif n == "RRR":
    print("3")
else:
    print("0")
S = input()
cnt = 0
for i in range(len(S)):
    if S[i] == 'R':
        cnt += 1
    else:
        cnt = 0
print(cnt)
S = str(input().split())

a = S.count('R')

print(a)
def main():
    S = input()
    count = 1
    if 'R' in S:
        for i in range(len(S)-1):
            if S[i] == S[i+1]:
                count += 1
        print(count)

    else:
        print(0)


if __name__ == '__main__':
    main()
def main():
    s = input()
    c = 0
    if s[0] == s[1] == "R" or s[1] == s[2] == "R":
        print(2)
        return

    if s[0] == s[1] == s[2] == "R":
        print(3)
        return
    
    if s[0] == s[1] == s[2] == "S":
        print(0)
        return
    print(1)
    return

main()
N = list(input())

#print(N)

def count(list_1):
    return list_1.count('R')

print(count(N))
nums=str(input())
if nums=="RRS" or nums=="SRR":
    print(2)
elif nums=="SSS":
    print(0)
else:
    print(1)
str1 = input()
if str1 == 'RRR':
    print(3)
else:
    for i in range(len(str1) - 1):
        if str1[i] == str1[i+1] == 'R':
            flag = 0
            break
        else:
            flag = 1
    if flag == 0:
        print(2)
    else:
        print(1)
s = input()

if s[0] == s[1] == s[2] == 'S':
  print(0)
elif s[1] != 'R' and (s[0] == 'R' or s[2] == 'R'):
  print(1)
elif s[1] == 'R' and s.count('R') == 2:
  print(2)
else:
  print(3)
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

s = input()
cnt = 0
ans = 0
for i in s:
    if i=='R':
        cnt += 1
    else:
        ans = max(ans,cnt)
        cnt = 0
print(ans)
S=input()
def fun(S):
    count=0
    max=0
    for i in S:
        if i=='R':
            count+=1
        
            if count>=max:
                max=count
            
    else:
        if count>=max:
            max=count
        count=0
    return max
print(fun(S))
s = input()
ans = 1

if s[0] == s[1]:
	ans += 1

if s[1] == s[2]:
	ans += 1

print(ans)
S=str(input())

ans = 0
if S == "SSS":
	ans = 0
elif S == "SSR" or S == "RSS" or S == "RSR":
	ans = 1
elif S == "SRR" or S == "RRS":
	ans = 2
elif S == "RRR":
	ans = 3
print(ans)
a = input()
list1 = a.split("S")
print(list)
if len(list1) == 1:
  print(3)
elif len(list1) == 2:
  if a == "RSR":
    print(1)
  else:
    print(2)
elif len(list1) == 3:
  print(1)
else:
  print(0)
# -*- coding: utf-8 -*-

S = input()

n = S.count('R')
print(n)
b = input()
if 'RSR' == b:
    print(1)
elif 'RRS' or 'SRR':
    print(2)
elif 'RRR':
    print(3)
else:
    print(0)
i = 0
j = 0
for s in input():
    j += 1

    if s == "R":
        i += 1
    if j != 3 and i > 1 and s == "S":
        i -= 1

print(i)
S = input()
rains = []
rain = 0
for i in range(3):
  if S[i] == "R":
    rain += 1
  else:
    rains.append(rain)
    rain = 0
if rains == []:
  rains.append(rain)
print(max(rains))
li = list(map(str, input()))
c=0
for i in range(3):
  if li[i]=='R':
    c=c+1
print(c)
def count_rainy(weather): 
    return len([r for r in weather if r == 'R'])

weather = input()
if len(weather) == 3:
    for w in weather:
        if w == 'S' or w == 'R':
            print(count_rainy(weather))
s =input()
ans = 0

for i in range(3):
  p = "R"*i
  if p in s:
    ans = i
print(ans)
import math

s = input()

if s == "RSR":
    print(1)
elif s == "RRS" or s == "SRR":
    print(2)
elif s == "RRR":
    print(3)
else:
    print(0)
s = str(input())
if s.count('S') == 0: print(3)
elif s[2] == 'S' or s[0] == 'S': print(2)
elif s[1] == 'S': print(1)
else: print(0)
s=input()
c=0
largest=0


for i in range(len(s)-1):
    if s[i] == s[i+1]:
        if c==0:
            c+=1
        c+=1
        #print("dasd",c,i,len(s))
    else:
        #print("asd", c)
        if c > largest:
            largest=c
        c=0
    if i + 2 == len(s):
        #print("asdfasd")
        if c > largest:
            largest=c

print(largest)
s = input()
cnt = 0
for i in range(3):
    if s[i] == "R":
        cnt += 1
    else:
        cnt = 0
print(cnt)
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

s = input()
cnt = 0
for i in s:
    if i=='R':
        cnt += 1
    else:
        break
print(cnt)
import sys
input = sys.stdin.readline

def main():
    S = input()
    if "RRR" == S:
        print(3)
    elif "RR" in S:
        print(2)
    elif "R" in S:
        print(1)
    else:
        print(0)

main()
c = 0
for i in input():
  if i=='R':
    c+=1
if c==3:
  print(3)
else:
  print(1)
r,s=0,input()
for i in range(3):
  if s[i]=='S':
    break
  r+=1
print(r)
s = str(input())
if s[2] == 'S' or s[0] == 'S': print(2)
else: print(1)