Problem:
 Score : 100 points    Problem Statement We have weather records at AtCoder Town for some consecutive three days. A string of length 3 , S , represents the records - if the i -th character is S , it means it was sunny on the i -th day; if that character is R , it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.      Constraints  |S| = 3  Each character of S is S or R .         Input Input is given from Standard Input in the following format:  S       Output Print the maximum number of consecutive rainy days in the period.        Sample Input 1 RRS      Sample Output 1 2  We had rain on the 1 -st and 2 -nd days in the period. Here, the maximum number of consecutive rainy days is 2 , so we should print 2 .       Sample Input 2 SSS      Sample Output 2 0  It was sunny throughout the period. We had no rainy days, so we should print 0 .       Sample Input 3 RSR      Sample Output 3 1  We had rain on the 1 -st and 3 -rd days - two "streaks" of one rainy day, so we should print 1 .

Solution (Python):
s = input()
d = {
    'SSS': 0,
    'SSR': 1,
    'SRS': 1,
    'SRR': 2,
    'RSS': 1,
    'RSR': 1,
    'RRS': 2,
    'RRR': 3,
}
print(d[s])

Solution (Python):
a = input()

if a =='RRR':
  print(3)
elif 'RR' in a: 
  print(2)
elif 'R' in a: 
  print(1)

else: print(0)

Solution (Python):
cnt = 0
t = input()
for i in range(len(t)):
    if "R" * (i + 1) in t:

        cnt = i + 1
print(cnt)

Solution (Python):
S = input()
if S == "RRR":
    print(3)
elif S == "RRS" or S == "SRR":
    print(2)
elif "R" in S:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
if s=="RRR":
  print(3)
elif "RR" in s:
  print(2)
elif "R" in s:
  print(1)
else:
  print(0)

Solution (Python):

s = input()
counter = 0
max_counter = 0
for si in s:
    if si == 'R':
        counter += 1
    else:
        counter = 0
    
    max_counter = max(counter,max_counter)

print(max_counter)

Solution (Python):
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

Solution (Python):
S = input()
cnt = 0
ans = 0
for s in S:
    if s == 'R':
        cnt += 1
    else:
        cnt = 0
    ans = max(ans, cnt)
print(ans)

Solution (Python):
print(max(map(len,input().split("S"))))

Solution (Python):
s=input()
for i in range(4)[::-1]:
    if "R"*i in s:
        print(i)
        break

Solution (Python):
s=input()
for i in range(4)[::-1]:
    if "R"*i in s:
        print(i)
        break

Solution (Python):
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    s = input()
    s = 'S' + s + 'S'
    cnt = 0
    tmp = 0
    for i in s:
        if i == 'S':
            cnt = max(cnt, tmp)
            tmp = 0
        else:
            tmp += 1
    print(cnt)


main()

Solution (Python):
import numpy as np
import sys
input = sys.stdin.readline

tenki = input()
tenki = list(tenki)

max = 0

num = tenki.count("R")

if num == 0:
  out = 0
elif num == 1:
  out = 1
elif num == 3:
  out = 3
elif num == 2:
  if tenki[1]=="S":
    out = 1
  else:
    out = 2

print(out)

Solution (Python):
X = str(input())
if X[0]=='R' and X[1]=='R' and X[2]=='R':
    print(3)
elif (X[0]=='R' and X[1]=='R') or (X[1]=='R' and X[2]=='R'):
    print(2)
elif X[0]=='R' or X[1]=='R' or X[2]=='R':
    print(1)
else:
    print(0)

Solution (Python):
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from heapq import heappush,heappop
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input().rstrip()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007

inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file = 1




    
def solve():

    
    

        s = list(si())
        if 'S' not in s:
            print(3)
        elif('R' not in s):
            print(0)
        elif(s[1]=='R' and (s[0]=='R' or s[2]=='R')):
            print(2)
        else:
            print(1)













        
if __name__ =="__main__":

    if(file):

        if path.exists('input.txt'):
            sys.stdin=open('input.txt', 'r')
            sys.stdout=open('output.txt','w')
        else:
            input=sys.stdin.readline
    solve()

Solution (Python):
s=input()
temp=0
if(s=="RRR"):print(3)
elif(s=="RRS" or s=="SRR"):print(2)
elif(s=="SSS"):print(0)
else:print(1)

Solution (Python):
s = input()
if s == 'RRR':
  print(3)
elif s == 'RRS' or s == 'SRR':
  print(2)
elif s == 'SSS':
  print(0)
else:
  print(1)

Solution (Python):
s = input()

if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()
ans = 0

if s == "RRR":
    ans = 3
elif s == "SSS":
    ans = 0
elif s == "RRS" or s == "SRR":
    ans = 2
else:
    ans = 1
print(ans)

Solution (Python):
s = input()

r = 0
ans = 0
for i in s:
    if i == 'R':
        r += 1
    else:
        ans = max(ans, r)
        r = 0

ans = max(ans, r)
print(ans)

Solution (Python):

s = input()
if s == "SSS":
    print(0)
elif s == "SRR" or s == "RRS":
    print(2)
elif s == "RRR":
    print(3)
else:
    print(1)

Solution (Python):
s=input()
cnt=0
_max=0
for i in [s[0],s[1],s[2]]:
    if i == 'R':
        cnt += 1
        if _max < cnt:
            _max = cnt
    else:
        cnt = 0
print(_max)

Solution (Python):
S = input()
if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

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


if __name__ == '__main__':
    main()

Solution (Python):
s = input()

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

Solution (Python):
N=input()
if N=='RRR':
  print(3)
elif N=='RRS' or N=='SRR':
  print(2)
elif N=='SSS':
  print(0)
else:
  print(1)

Solution (Python):
string = input()
result = string.count("R")
if(result == 2 and string[1] == "S"):
  print("1")
else:
  print(result)

Solution (Python):
x = input()
ans = 0
mx = 0
for l in x:
  if l=='R':
    ans+=1
  elif ans>0:
    ans-=1
  if ans>mx:
    mx = ans
print(mx)

Solution (Python):
s = input() 

if 'RRR' in s:
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
ct=0
mx=0
for i in s:
  if(i=='R'):
    ct+=1
    mx=max(ct,mx)
  else:
    ct=0
print(mx)

Solution (Python):
s=input()

if s=='RRR':
    print(3)
elif s=='RRS' or s=='SRR':
    print(2)
elif 'R' in s:
    print(1)
else:
    print(0)

Solution (Python):
S = input()
res, prev, count = 0, '', 0
for s in S:
  if s == 'R':
    count += 1
  else:
    res = max(res, count)
    count = 0
print(max(res, count))

Solution (Python):
A = list(input())

n = A.count('R')
if n != 2:
    print(n)
else:
    m = A.index('S')
    if m == 1:
        print(1)
    else:
        print(2)

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


if __name__ == "__main__":
    solve()

Solution (Python):
S = input()
pre_weather = "S"

cnt = 0
ans = 0
for i in range(3):
    if pre_weather == "R" and S[i] == "R":
        cnt += 1
    elif S[i] == "R":
        cnt = 1
    pre_weather = S[i]
    
    ans = max(cnt,ans)

print(ans)

Solution (Python):
S = str(input())

if S.find('RRR')!=-1:
  print(3)
elif S.find('RR')!=-1:
  print(2)
elif S.find('R')!=-1:
  print(1)
else:
  print(0)

Solution (Python):
S = str(input())
count =0
flag = 1
if S[1]=='R':
    if S[0]=='R'and S[2]=='R':
        count= 3
    elif S[0]=='R'and S[2]=='S':
        count= 2
    elif S[0]=='S'and S[2]=='R':
        count= 2
    elif S[0] == 'S' and S[2] == 'S':
        count = 1
else:
    if S[0]=='R'and S[2]=='R':
        count= 1
    elif S[0]=='S'and S[2]=='R':
        count= 1
    elif S[0]=='R'and S[2]=='S':
        count= 1
    elif S[0] == 'R' and S[2] == 'R':
        count = 1
print(count)

Solution (Python):
S = input()
if S == 'SSS':
  print(0)
elif S == 'SSR':
  print(1)
elif S == 'SRS':
  print(1)
elif S == 'SRR':
  print(2)
elif S == 'RSS':
  print(1)
elif S == 'RSR':
  print(1)
elif S == 'RRS':
  print(2)
else:
  print(3)

Solution (Python):
S = input()
for i in range(3, -1, -1):
    if "R" * i in S:
        print(i)
        break

Solution (Python):
s = input()
if s == 'RRR':
    print(3)
elif s == 'RRS' or s == 'SRR':
    print(2)
elif s == 'RSS' or s == 'SRS' or s == 'SSR' or s == 'RSR':
    print(1)
elif s == 'SSS':
    print(0)

Solution (Python):
ct_max = 0
ct = 0
for s in list(input()):
    if s == 'R':
        ct += 1
    else:
        ct = 0
    if ct > ct_max:
        ct_max = ct

print(ct_max)

Solution (Python):
S = input()
if S =='SSS':
  print('0')
elif S == 'RRR':
  print('3')
elif S == 'RRS' or S == 'SRR':
  print('2')
else :
  print('1')

Solution (Python):
s = input()

ans = 0
if s.count("R") == 3:
    print(3)
elif s.count("R") == 2:
    if s[0] == s[1] or s[1] == s[2]:
        print(2)
    else:
        print(1)
elif s.count("R") == 1:
    print(1)
else:
    print(0)

Solution (Python):
S=input()
if S=='RSR':
    print(1)
else:
    print(S.count('R'))

Solution (Python):

import sys


def solve(S: str):
    if 'RRR' in S:
        return 3
    elif 'RR' in S:
        return 2
    elif 'R' in S:
        return 1
    else:
        return 0



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    print(solve(S))

if __name__ == '__main__':
    main()

Solution (Python):
S = input()

print(1 if S == "RSR" else S.count("R"))

Solution (Python):
if __name__ == "__main__":
    weather_str = input()

    if weather_str == "SSS":
        print(0)
        exit()

    weather = list(weather_str)
    weather.append("END")

    r = range(len(weather)-1)
    c = []
    start = 1
    tmp = start

    for i in r:
        if weather[i] == "R" and weather[i] == weather[i+1]:
            tmp += 1
        else:
            c.append(tmp)
            tmp = start

    print(max(c))

Solution (Python):
input_line = input()

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)
        
else:
    print(index)

Solution (Python):
s = input()
cnt = 0
maxcnt = 0
for c in s:
    if c == 'R':
        cnt += 1
    else:
        cnt = 0
    if maxcnt < cnt:
        maxcnt = cnt
print(maxcnt)

Solution (Python):
S = input()

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

Solution (Python):
ws = input()

i, r, ans = 0, 0, 0

while i < 3:
    if ws[i] == "R":
        r += 1
        ans = max(ans, r)
    else:
        r = 0
    i += 1
print(ans)

Solution (Python):

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

Solution (Python):
s = str(input())
l = len(s)
c=0
ans=0
for i in range(0,l):
  if s[i]=='R':
    c+=1
    ans=max(c,ans)
  else:
    ans=max(c,ans)
    c=0
print(ans)

Solution (Python):
S = str(input())

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

Solution (Python):
s = input()
c=0
ma=0
for i in range(len(s)):
    if s[i] == 'R':
        c+=1
    else:
        ma = max(ma,c)
        c=0
    if i == len(s)-1:
        ma = max(ma,c)
print(ma)

Solution (Python):
i = input()


if i == "SSS":
    print(0)
elif i == "RRR":
    print(3)
elif i == "RSR" or i == "SSR" or i=="RSS" or i=="SRS":
    print(1)
elif i == "RRS" or i=="SRR":
    print(2)

Solution (Python):
S = input()

if 'RRR' in S:
  print(3)
elif 'RR' in S:
  print(2)
elif 'R' in S:
  print(1)
else:
  print(0)

Solution (Python):
s = input()
if s == 'RRR':
  print(3)
elif s == 'RRS' or s == 'SRR':
  print(2)
elif s == 'SSS':
  print(0)
else:
  print(1)

Solution (Python):
S = input()
cnt = 0
if S.count("R") == 3:
  cnt = 3
elif S.count("R") == 1:
  cnt = 1
elif S.count("R") == 0:
  cnt = 0
else:
  if (S[0] == "R" and S[1] == "R") or (S[1] == "R" and S[2] == "R"):
    cnt = 2
  else:
    cnt = 1
print(cnt)

Solution (Python):
S = input()

flag = False
count = 0
max_c = -1
for s in S:
    if s == "R":
        count += 1
        flag = True
    elif flag:
        max_c = max(count, max_c)
        flag = False
        count = 0
print(max(count, max_c))

Solution (Python):
s = input()

cnt = 0
L = []
for i in s:
    if i == "R":
        cnt += 1
    else:
        L.append(cnt)
        cnt = 0
L.append(cnt)
print(max(L))

Solution (Python):
wether = input()
if wether == 'SSS':
    print(0)
elif wether == 'RRR':
    print(3)
elif wether[:2] == 'RR' or wether[1:] == 'RR':
    print(2)
else:
    print(1)

Solution (Python):
s = input()
for i in range(3, -1, -1):
    if 'R' * i in s:
        print(i)
        break

Solution (Python):
s = input()
for i in range(3, -1, -1):
    if 'R' * i in s:
        print(i)
        break

Solution (Python):
st = input()
if st == "SSS":
    print(0)
elif st == "SSR":
    print(1)
elif st == "SRS":
    print(1)
elif st == "SRR":
    print(2)
elif st == "RSS":
    print(1)
elif st == "RSR":
    print(1)
elif st == "RRS":
    print(2)
elif st == "RRR":
    print(3)

Solution (Python):
s = input()

if 'R' not in s:
    ans = 0
elif 'S' not in s:
    ans = 3
elif s in ('RSR', 'RSS', 'SSR', 'SRS'):
    ans = 1
else:
    ans = 2

print(ans)

Solution (Python):
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

s = input()

num = s.count("R")

if s == "RSR":
    print(1)

else:
    print(num)

Solution (Python):
text = input()
if text == 'SSS':
    print(0)
elif text == 'RSS':
    print(1)
elif text == 'SRS':
    print(1)
elif text == 'SSR':
    print(1)
elif text == 'RRS':
    print(2)
elif text == 'RSR':
    print(1)
elif text == 'SRR':
    print(2)
elif text == 'RRR':
    print(3)
else:
    print('that is invalid. ')

Solution (Python):
x = input()
if x == "SSS":
    print(0)

elif x == "SSR":
    print(1)

elif x == "SRS":
    print(1)

elif x == "RSS":
    print(1)

elif x == "RSR":
    print(1)

elif x == "RRS":
    print(2)

elif x == "SRR":
    print(2)

else:
    print(3)

Solution (Python):
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[1] == 'R' or s[2] == 'R':
    print(1)
else:
    print(0)

Solution (Python):
s = input()
ans = 0
if s == "RRR":
  ans = 3
if s == "RRS":
  ans = 2
if s == "RSR":
  ans = 1
if s == "RSS":
  ans = 1
if s == "SRR":
  ans = 2
if s == "SRS":
  ans = 1
if s == "SSR":
  ans = 1
if s == "SSS":
  ans = 0
print(ans)

Solution (Python):
S = list(input())
count = 0
max_count =0
for i in S :
    if(i=='R'):
        count = count + 1
    else :
        if(max_count < count) :
            max_count = count
            count = 0
if(max_count < count) :
    max_count = count

print(max_count)

Solution (Python):
S = input()
a = list()
b = 0
u = 0
for i in range (len(S)):
    if S[u] == 'R':
        b = b + 1
    else:
        a.append(b)
        b = 0
    u = u + 1
a.append(b)
a.sort()
a.reverse()
print(a[0])

Solution (Python):
a=input();
if a == 'SSS':
    print('0')
elif a == 'RSS' or a == 'SRS' or a == 'SSR' or a == 'RSR':
    print('1')
elif a == 'RRS' or a == 'SRR':
    print('2')
else:
    print('3')

Solution (Python):
weather = input()
N = len(weather)

count = 0
answer = 0
for i in range(N):
    if weather[i] == 'R':
        count += 1
        answer = max(answer, count)
    else:
        count = 0

print(answer)

Solution (Python):
s = input()

if s == 'RRR':
    print('3')
if s == 'RRS':
    print('2')
if s == 'SRR':
    print('2')
if s == 'RSR':
    print('1')
if s == 'SRS':
    print('1')
if s == 'SSR':
    print('1')
if s == 'RSS':
    print('1')
if s == 'SSS':
    print('0')

Solution (Python):
if __name__ == "__main__":
    S = input()
    ans = 0
    for r in S.split("S"):
        ans = max(len(r), ans)
    print(ans)

Solution (Python):
s = input()
a = s.count('R')
if a == 2:
    if s == "RSR":
        print(1)
    else :
        print(a)
else :
    print(a)

Solution (Python):
s=input()
print(s.count('R') if s.count('R')!=2 else 2 if s[0]==s[1]=='R' or s[1]==s[2]=='R' else 1)

Solution (Python):


a= []
a= input(" ")

if(a[0]==a[1] and a[1]==a[2]):
    if(a[0]=="R"):
        print(3)
    else:
        print(0)
elif(a[1]=="S"):
    if(a[0]=="R" or a[2]=="R"):
        print(1)
elif(a[1]=="R"):
    if (a[0]==a[1] or a[1]==a[2]):
        print(2)
    else:
        print(1)

Solution (Python):
S = input()
if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
a = input()
ans2 = 0
max1= 0
for i in range(3):
    if a[i] == 'R':
        ans2 += 1
    else:
        max1= max(ans2, max1)
        ans2 = 0
print(max(ans2, max1))

Solution (Python):
str = input()

count = 0


if str == "RRR":
        print(3)
elif "RR" in str:
        print(2)
elif("R" in str):
        print(1)
else:
        print(0)

Solution (Python):
a = input()
ans = 0
max_ans = 0
for i in range(3):
    if a[i] == 'R':
        ans += 1
    else:
        max_ans = max(ans, max_ans)
        ans = 0
print(max(ans, max_ans))

Solution (Python):
lst = input()
if lst.count("RRR") == 1:
  print(3)
elif lst.count("RR") == 1:
  print(2)
elif lst.count("R") != 0:
  print(1)
else:
  print(0)

Solution (Python):
weat= input()
imput = 0
if weat == 'SSS':
  imput = 0
if weat == 'SSR' or weat == 'RSS' or weat == 'SRS' or weat == 'RSR':
  imput = 1
if weat == 'SRR' or weat == 'RRS':
  imput = 2
if weat == 'RRR':
  imput = 3

print(imput)

Solution (Python):
S = list(input())
RD = S.count('R')
if RD != 2:
    print(RD)
else:
    if S[1] == 'R':
        print(RD)
    else:
        print(1)

Solution (Python):
r = input()
if r == 'RRR':
    print(3)
elif r == 'RRS' or r == 'SRR':
    print(2)
elif r == 'RSR' or r == 'RSS' or r =='SSR' or r =='SRS':
    print(1)
elif r == 'SSS':
    print(0)

Solution (Python):
data = input()

if data[0]=="R" and data[1]=="R" and data[2]=="R":
    print(3)
elif (data[0]=="R" and data[1]=="R") or (data[1]=="R" and data[2]=="R"):
    print(2)
elif data[0]=="R" or data[1]=="R" or data[2]=="R":
    print(1)
else:
    print(0)

Solution (Python):
s = input()
tmp = s.count('R')
if s=='RSR':
    print(1)
else:
    print(tmp)

Solution (Python):
s = input()
k = 0
if s[0] == 'S':
    if s[1] == 'R' and s[2] == 'R':
        k = 2
    elif s[1] == 'S' and s[2] == 'S':
        k = 0
    else:
        k = 1
if s[0] == 'R':
    if s[1] == 'R':
        if s[2] == 'R':
            k = 3
        else:
            k = 2
    else:
        k = 1
print(k)

Solution (Python):
weather=list(input())
r= weather. count("R")
if r==2 and weather[1]=="S":
   print(1)
else:
   print(r)

Solution (Python):
it = lambda: list(map(int, input().strip().split()))

def solve():
    S = input().strip()
    assert len(S) == 3
    if S[0] == S[1] == S[2] == 'R':
        return 3
    elif S[0] == S[1] == 'R' or S[1] == S[2] == 'R':
        return 2
    elif S[0] == 'R' or S[1] == 'R' or S[2] == 'R':
        return 1
    return 0

if __name__ == '__main__':
    ans = solve()
    print(ans)

Solution (Python):
x = input()
if 'RRR' == x:
  print(3)
elif 'RR' in x:
  print(2)
elif 'R' in x:
  print(1)
else:
  print(0)

Solution (Python):
s = input() + "S"

max_count = 0
count = 0
for d in s:
    if d == "R":
        count += 1
    else:
        if count > max_count:
            max_count = count
        count = 0

print(max_count)

Solution (Python):
s = input()
if s == 'RRR':
    print(3)
elif s == 'SSS':
    print(0)
elif 'RR' in s:
    print(2)
else:
    print(1)

Solution (Python):
str1 = input()
if str1 == 'RRR':
    print(3)
elif str1 == 'SSS':
    print(0)
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)

Solution (Python):
s=input()
if 'RRR'in s:
  print(3)
elif 'RR' in s:
  print(2)
elif 'R' in s:
  print(1)
else:
  print(0)

Solution (Python):
s=input()
cnt=0
if s=='RRR':
  cnt = 3
elif s== 'RRS':
  cnt = 2
elif s== 'SRR':
  cnt = 2
elif s == 'RSS':
  cnt= 1
elif s == 'RSR':
  cnt=1
elif s == 'SRS':
  cnt=1
elif s=='SSR':
  cnt=1
print(cnt)

Solution (Python):
S = input()
count = 0
if 'R' in S:
    count = 1
if 'RR' in S:
    count = 2
if 'RRR' in S:
    count = 3
print(count)

Solution (Python):
S = input()
if S == 'RSR' or S == 'RSS' or S == 'SRS' or S == 'SSR' :
  print(1)
elif S == 'SSS' :
  print(0)
elif S == 'RRR' :
  print(3)
else :
  print(2)

Solution (Python):
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

s = input()

if s=='RRR':
    print(3)
elif 'RR' in s:
    print(2)
elif s=='SSS':
    print(0)
else:
    print(1)

Solution (Python):
s=input()
 
if s=='SSS':
  print(0)
elif s=='SRR' or s=='RRS':
  print(2)
elif s=='RRR':
  print(3)
else:
  print(1)

Solution (Python):
s = input()
max_r = 0
last_c = 0
for x in s:
    last_c = last_c + 1 if x == 'R' else 0 
    max_r = max(max_r, last_c)
print(max_r)

Solution (Python):
import sys


S = input()

if S == 'RRR':
	print(3)
elif 'RR' in S:
	print(2)
elif 'R' in S:
	print(1)
else:
	print(0)

Solution (Python):
curr=0
mx=0
s=input()
for i in s:
    if i=='R':
        curr+=1
    else:
        mx=max(mx,curr)
        curr=0
mx=max(mx,curr)
print(mx)

Solution (Python):
s = input()
if s == 'RRR':
    print('3')
elif s == 'RRS' or s == 'SRR':
    print('2')
elif s == 'SSS':
    print('0')
else:
    print('1')

Solution (Python):
s = input()
if s == 'SSS':
    ans = 0
elif s == 'RRR':
    ans = 3
elif s in ['RRS', 'SRR']:
    ans = 2
else:
    ans = 1
print(ans)

Solution (Python):
s = list(input())

x = s[0] == "R"
y = s[1] == "R"
z = s[2] == "R"

if x and y and z:
    print(3)
elif (x and y) or (y and z):
    print(2)
elif x or y or z:
    print(1)
else:
    print(0)

Solution (Python):
s=input()
if "RRR" in s:
  print(3)
elif "RR" in s:
  print(2)
elif "R" in s:
  print(1)
else:
  print(0)

Solution (Python):
S=input()

if 'RRR' in S:
    print('3')
elif 'RR' in S:
    print('2')
elif 'R' in S:
    print('1')
else:
    print('0')

Solution (Python):
s = str(input())
cnt = 0
Max = 0
for i in range(len(s)):
    if s[i] == "R":
        cnt += 1
    else:
        Max = max(Max,cnt)
        cnt = 0
Max = max(Max,cnt)
print(Max)

Solution (Python):
S = input()
if S.count("R") == 3:
    print("3")
elif S.count("R") == 2:
    if S[1] == S[0]:
        print("2")
    elif S[1] == S[2]:
        print("2")
    else:
        print("1")
elif S.count("R") == 1:
    print("1")
else:
    print("0")

Solution (Python):
S = input()

if S == 'RRR':
    print(3)
elif S == 'SRR' or S == 'RRS':
    print(2)
elif S == 'SSS':
    print(0)
else:
    print(1)

Solution (Python):
s = input()
ans = 0
res = 0
for text in s:
    if text == 'R':
        res += 1
    else:
        res = 0
    ans = max(ans, res)

print(ans)

Solution (Python):

import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)




def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()[:-1]


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


S = S()
ans = 0
tmp = 0
for s in S:
    if (s == 'R'):
        tmp += 1
    else:
        ans = max(ans, tmp)
        tmp = 0
ans = max(ans, tmp)

print(ans)

Solution (Python):
S=input()

num=0
ans=0
for i in range(3):
    if S[i]=="R":
        num+=1
        ans=num
    else:
        num=0

print(ans)

Solution (Python):
s=input()
if s=="RRR":
  print(3)
elif s=="RRS" or s=="SRR":
  print(2)
elif s=="SSS":
  print(0)
else:
  print(1)

Solution (Python):
S = input()
ans = 0

if S == "RSR":
    print(1)

else:
    for p in range(3):
        if S[p] == "R":
            ans += 1
    print(ans)

Solution (Python):
c = 0
r = []
for i in input():
  if i=='R':
    c+=1
  else:
    r.append(c)
    c = 0
r.append(c)
if not len(r):
  print(c)
else:
  print(max(r))

Solution (Python):
s = input()

if s == "RRR":
    print(3)
elif s == "RRS" or s == "SRR":
    print(2)
elif s == "SSS":
    print(0)
else:
    print(1)

Solution (Python):
weather = input().split('S')

Max = 0

for item in weather:
    if len(item) > Max:
        Max = len(item)

print(Max)

Solution (Python):
Word=input()
Word_list=list(Word)
 
number=0
renzoku=0
Enter=0
 
for num in range(3):
  if Word_list[num]=="R":
    number=number+1
  if (number>renzoku):
      renzoku=number
  else:
    number=0

print(renzoku)

Solution (Python):
s = input()
print(max([1 if s.count('R') else 0, 2 if s.count('RR') else 0, 3 if s.count('RRR') else 0]))

Solution (Python):
a=input()
con=0
count=0
for i in range(3):
    if a[i]=='R' and i==2:
        count+=1
        con=max(con,count)
    elif a[i]=='R':
        count+=1
    else:
        con=max(con,count)
        count=0
print(con)

Solution (Python):
s = input()
cnt = 0
l =[]
for i in range(3):
    if s[i] == "R":
        cnt += 1
    else:
        l.append(cnt)
        cnt = 0

l.append(cnt)

print(max(l))

Solution (Python):
s = input()
if(s =="RRS")or(s =="SRR"):
    print(2)
elif(s =="RRR"):
    print(3)
elif(s =="SSS"):
    print(0)
else:
    print(1)

Solution (Python):
a = input()
if "RRR" in a:
    print(3)
elif "RR" in a:
    print(2)
elif "R" in a:
    print(1)
else:
    print(0)

Solution (Python):
def f(s):
    if s[0] == s[1] == s[2] == 'R':
        print(3)
    elif s[0] == s[1] == s[2] == 'S':
        print(0)
    elif (s[0] == s[1] == 'R') or (s[1] == s[2] == 'R'):
        print(2)
    elif (s[0] == s[2] == 'R'):
        print(1)
    else:
        print(1)

s = input()
f(s)

Solution (Python):



def next_line():
    return input()


def next_int():
    return int(input())


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


def next_int_array_multi_lines(size):
    return [int(input()) for _ in range(size)]


def next_str_array(size):
    return [input() for _ in range(size)]


def main():
    s = next_line()
    x = 0
    if s == "RRR":
        x = 3
    elif s == "RRS" or s == "SRR":
        x = 2
    elif s == "SSS":
        x = 0
    else:
        x = 1
    print(x)


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
if S == 'RRR':
    print(3)
elif  S == 'SSS':
    print(0)
elif S in ['RRS', 'SRR']:
    print(2)
else:
    print(1)

Solution (Python):
s = input()
c = 0
m = 0
for i in s:
  if i == 'R':
    c += 1
  else:
    if m < c:
      m = c
    c = 0
print(m if m > c else c)

Solution (Python):
S = input()
ans = 0
count = 0

for i in S:
    if i == "R":
        count += 1


if count == 2:
    if S[1] == "S":
        ans = 1
    else:
        ans = 2
else:
    ans = count

print(ans)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()


S = input()
c = 0
b = False

for s in S:
    if s == 'R':
        c += 1
        b = True
    else:
        if b:
            break

print(c)

Solution (Python):
S = list(input())
max = 0
curr = 0

for s in S:
  if s == "R":
    curr += 1
    if curr > max:
      max = curr
  if s == "S":
    curr = 0

print(max)

Solution (Python):
S = input()

if S == 'RRR':
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
S = input()
if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Solution (Python):
S = input()
count = 0
anslist = []
for i in range(3):
    if S[i]=="R":
        count+=1
    elif S[i]=="S":
        anslist.append(count)
        count = 0
    if i==2:
        anslist.append(count)
print(max(anslist))

Solution (Python):
weather = input().rstrip()


if weather.count('RRR') == 1:
    print(3)
elif weather.count('RR') == 1:
    print(2)
elif weather.count('R') >= 1:
    print(1)
else:
    print(0)

Solution (Python):
s=str(input())
count=0
for i in range(3):
	if s[i]=="R":
		if i==0:
			count+=1
		elif s[i-1]=="S":
			count=1
		else:
			count+=1
print(count)

Solution (Python):
s = input()
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[1]=='R' and s[2]=='R':
  print(2)
elif s[0]=='R' or s[1]=='R' or s[2]=='R':
  print(1)
else:
  print(0)

Solution (Python):
S = input()
counter = 0
tmp = 0
for s in S:
    if s == 'R':
        counter += 1
        tmp = counter
    else:
        counter = 0
print(tmp)

Solution (Python):
print({
    "SSS": 0,
    "SSR": 1,
    "SRS": 1,
    "SRR": 2,
    "RSS": 1,
    "RSR": 1,
    "RRS": 2,
    "RRR": 3,
}[input()])

Solution (Python):
str = input()
ans = 0
list_ans=[]
flag = 0
for i in range(len(str)):
    if str[i] == 'R':
        if flag == 0:
            ans = 1
        else:
            ans += 1
        flag = 1
    else:
        flag = 0
        list_ans.append(ans)
list_ans.append(ans)
print(max(list_ans))

Solution (Python):
S=input()
if S=="RRR":
    print(3)
elif S=="RRS" or S=="SRR":
    print(2)
elif S=="SSS":
    print(0)
else:
    print(1)

Solution (Python):
line = list(input())
count = 0
if line[0] == "R":
  if line[1] == "R":
    if line[2] == "R":
      count = 3
    else:
      count = 2
  else:
    count = 1
elif line[1] == "R":
  if line[2] == "R":
    count = 2
  else:
    count = 1
elif line[2] == "R":
  count = 1
print(str(count))

Solution (Python):
weather = input()
if 'RRR' in weather:
    print(3)
elif 'RR' in weather:
    print(2)
elif 'R' in weather:
    print(1)
else:
    print(0)

Solution (Python):
weather = input()
rainy_count = 0
max_rainy_count = 0

for i in range(3):
  if weather[i] == "R":
    rainy_count += 1
    if max_rainy_count < rainy_count:
        max_rainy_count = rainy_count
    
  else:
    rainy_count = 0
            
print(max_rainy_count)

Solution (Python):
S = input()

if S.count("RRR") == 1:
    print(3)
elif S.count("RR") == 1:
    print(2)
elif S.count("R") != 0:
    print(1)
else:
    print(0)

Solution (Python):
inp =input()
count=0 
res=0 
for ch in inp: 
  if ch=="R": 
    count+=1 
    res = max(res,count) 
  else: 
    res=max(res,count) 
    count=0 
print(res)