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()
if S[0] == 'R' and S[1]=='R' and S[2]=='R':
  print('3')
elif S[0] == 'R' and S[1]=='R' and S[2]=='S':
  print('2')
elif S[0] == 'S' and S[1]=='R' and S[2]=='R':
  print('2')
elif S[0] == 'S' and S[1]=='S' and S[2]=='R':
  print('1')
elif S[0] == 'S' and S[1]=='R' and S[2]=='S':
  print('1')
elif S[0] == 'R' and S[1]=='S' and S[2]=='S':
  print('1')
elif S[0] == 'R' and S[1]=='S' and S[2]=='R':
  print('1')
elif S[0] == 'S' and S[1]=='S' and S[2]=='S':
  print('0')

Solution (Python):
S = input()
if S.count('R') == 0:
    print(0)
elif S.count('R') == 1 or S == 'RSR':
    print(1)
elif S.count('R') == 3:
    print(3)
else:
    print(2)

Solution (Python):
S = input()
arr = list(S)
count = 0
max = 0
for a in arr:
    if(a == 'R'):
        count += 1
        if(count > max):
            max = count
    else:
        count = 0
        
print(max)

Solution (Python):
x = input()

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

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

if S == 'RSR':
    ans = 1
else:
    ans = S.count('R')

print(ans)

Solution (Python):
S=input()
for i in range(0,3):
    if S[0]=="R" and S[1]=="R" and S[2]=="R":
        x=3
    elif S[0]=="R" and S[1]=="R":
        x=2
    elif S[1]=="R" and S[2]=="R":
        x=2
    elif S[0]=="R" or S[1]=="R" or S[2]=="R":
        x=1
    else:
        x=0
print(x)

Solution (Python):
N=list(map(str,input()))

count=0
ans=0
for i in N:
    if i=="R" and count>=1:
        count+=1
    elif i=="R" and count==0:
        count=1
    else:
        count=0
    ans=max(ans,count)
    
        
print(ans)

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

if S=="RSS" or S=="RSR" or S=="SRS" or S=="SSR":
    print(1)

if S=="SRR" or S=="RRS":
    print(2)

if S=="RRR":
    print(3)

Solution (Python):
S = input()

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

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

Solution (Python):
S = input()

continuous_flag = True
res = 0
temp = 0
for s in S:
    if s == 'R':
        temp += 1
    else:
        res = max(res, temp)
        temp = 0
if temp >= 1:
    res = max(res, temp)
print(res)

Solution (Python):
k = input()

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

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

Solution (Python):
s = input()
R_list = s.split('S')

ans = 0

for s in R_list:
  if ans < len(s):
    ans = len(s)
    
print(ans)

Solution (Python):
R = input()

rain_count = 0
reset = False
max_count = 0

for i in range(len(R)):
  if R[i] == "R":
    rain_count += 1
  else:
    reset = True
  
    if reset:
      max_count = max(max_count, rain_count)
      rain_count = 0

print(max(rain_count, max_count))

Solution (Python):
a=input()
b=len(a)
c=0
s=0
m=0
while c<b:
    if a[c]=='R':
    	s=s+1
    	if m<s:
      		m=s
    if a[c]=='S':
      
      s=0
    c=c+1
print(m)

Solution (Python):
S = input()

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

Solution (Python):
S = list(input())
c = ""
a = 0
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):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))



def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  
from functools import reduce

S = input()
ans = S.count('R')
if ans == 0:
    exit(0)

if S[1] == 'S':
    ans = 1
print(ans)

Solution (Python):
import math
import collections
import bisect
from collections import deque
from copy import copy, deepcopy
  
def main():
    S = input()
    cnt=0
    ans=0
    for i,s in enumerate(S):
        if s=='R':
            cnt+=1
        if i==len(S)-1 or s=="S":
            ans=max(ans,cnt)
            cnt=0
    print(ans)
 
if __name__ == '__main__':
    main()

Solution (Python):
S = input()
cnt = 0
cnt_list = []
for i in range(3):
    if S[i]=='R':
        cnt+=1
        if i == 2:
            cnt_list.append(cnt)
    else:
        cnt_list.append(cnt)
        cnt=0
print(max(cnt_list))

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

Solution (Python):
S = input()

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

Solution (Python):
a=list(input())
d=0
h=0
for i in range(len(a)):
  if a[i] == 'S':
    d=0
  else:
    d+=1
    h=max(h,d)
  
print(max(d,h))

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

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

Solution (Python):

_INPUT = """\
RSR
"""

def main():
    a = input()
    tenki = [b for b in a]

    if "R" not in tenki:
        print(0)
    elif tenki.count("R") == 1 :
        print(1)
    elif tenki.count("R") == 2:
        if tenki[1] == "S":
            print(1)
        else :
            print(2)
    else:
        print(3)


if __name__ == '__main__':
    import io
    import sys
    import math
    import itertools

    
    main()

Solution (Python):
S = input()

cnt = S.count('R')

if S == 'RSR':
 print('1')
else:
 print(cnt)

Solution (Python):
s=str(input())
if s=="SRS":
  print(1)
  exit()
if "R" not in list(set(list(s))):
  print(0)
  exit()
else:
  if s[1]=="S":
    print(1)
    exit()
  else:
    if s[0]=="S" or s[2]=="S":
      print("2")
      exit()

print("3")

Solution (Python):
s=str(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()
cnt = 0
M = 0
for i in range(len(S)):
    if S[i] == 'R':
        cnt += 1
    else:
        cnt = 0
    if cnt > M:
        M = cnt
print(M)

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

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

Solution (Python):
line = list(input())
ans = int(0)

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

print(ans)

Solution (Python):
string=input()

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

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

cnt = 0

for i in range(3):
    if(s[i] == "R"):
        cnt += 1

if(s[0] == "R" and s[1] == "S" and s[2] == "R"):
    cnt = 1


print(cnt)

Solution (Python):
x,y,z = input()
if x == 'R':
    if y == 'R':
        if z == 'R':
            print('3')
        else:
            print('2')
    else:
        print('1')
elif x == 'S':
    if y == 'R':
        if z == 'R':
            print('2')
        else:
            print('1')
    elif z == 'R':
        print('1')
    else:
        print('0')

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

Solution (Python):
weather = input()
raincount=0
cont=0
for  i in range(3):
    if weather[i]=="R" and cont==0:
           raincount=raincount+1
    elif weather[i]=="R" and cont==1:
           raincount=1
           cont=0
    elif weather[i] == "S":
        cont=1

print(raincount)

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

for i in range(3):
  if s[i] == 'R':
    ans += 1
    break
    
if i == 0:
  if s[1] == 'R':
    ans += 1
    if s[2] == 'R':
      ans += 1
      
elif(i == 1):
  if s[2] == 'R':
    ans += 1
    
print(ans)

Solution (Python):
S = input()

if S =="SSS":
  print(0)
elif S[1] == "S":
  print(1)
elif S == "SRS":
  print(1)
elif S == "RRR":
  print(3)
else:
  print(2)

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

Solution (Python):
str1 = input()

num = str1.count('R')

if num == 3:
    print('3')
elif num == 2:
    if str1[1] == 'S':
        print('1')
    else:
        print('2')
elif num == 1:
    print('1')
else:
    print('0')

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 = list(str(input()))
import sys

if s[0] == 'R' and s[1] == 'R' and s[2] == 'R':
  print("3")

if s[0] == 'S' and s[1] == 'S' and s[2] == 'S':
  print("0")

sum = 0
for i in range(3):
  if s[i] == "R":
    sum += 1
if sum == 1:
  print("1")
elif sum == 2:
  for i in range(2):
    if s[i] == "R" and s[i+1] == "R":
      print("2")
      sys.exit()
  print("1")

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

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

if S == ('R', 'R', 'R'):
    print(3)
elif S == ('R', 'R', 'S') or S == ('S', 'R', 'R'):
    print(2)
elif S == ('S', 'S', 'S'):
    print(0)
else:
    print(1)

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

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

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

rainy = climate.count('R')
sunny = climate.count('S')

if rainy == 1:
    print(1)
elif rainy == 3:
    print(3)
elif rainy == 2:
    if (climate[0] == 'R' and climate[2] == 'R'):
        print(1)
    else:
        print(2)
else:
    print(0)

Solution (Python):
S = input()

R = []
r = 0
for s in S:
    if s == "R":
        r += 1
    if s == "S":
        R.append(r)
        r = 0
    R.append(r)

print(max(R))

Solution (Python):
S=input()

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

Solution (Python):
l = input()

if l == 'SSS':
	print(0)

elif l == 'SSR' or l == 'RSS' or l == 'SRS' or l == 'RSR':
	print(1)

elif l == 'SRR' or l == 'RRS':
	print(2)
  
elif l == 'RRR':
	print(3)

Solution (Python):
S = input()

c = S.count('R')

if ('RSR' in S):
  print(1)
else:
  print(c)

Solution (Python):
import math
a=input()
a=list(a)
b=len(a)
c=0
for i in range(int(b)):
    if(a[i]=="R"):
        c=c+1
    if(c>=1 and a[i]=="S"):
        break
print(c)

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

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

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

Solution (Python):
s = input()


for i in s:
    if(i=='R'):
        mxcount=1
        break
    
else:
    mxcount = 0
count =1

if(len(s)>1): 
    for i in range(1,len(s)):
        if(s[i-1]=='R' and s[i]=='R'):
            count+=1
            if(mxcount<count):mxcount=count
            
        else:
            count=1
            
    print(mxcount)
    
else:
    if(s=='R'):
        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()
numR = 0
sunny = False
for i in range(len(S)):
    if S[i] == 'R' and not sunny:
        numR += 1
    else:
        if numR != 0:
            sunny = True
        continue


print(numR)

Solution (Python):
mozi = input()
a = list(mozi)
if a[0] == 'R' and a[1] == 'R' and a[2] == 'R':
    print(3)
elif a[0] == 'R' and a[1] == 'R':
    print(2)
elif a[1] == 'R' and a[2] == 'R':
    print(2)
elif a[0] == 'R':
    print(1)
elif a[1] == 'R':
    print(1)
elif a[2] == 'R':
    print(1)
else:
    print(0)

Solution (Python):
S = input()
Ans = 0
sr = 0

for i in range(1,4):
  if S[i-1] == 'S':
    sr = 0
  else:
    sr += 1
    if sr > Ans:
      
      Ans = sr
    
print(Ans)

Solution (Python):
S = 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):
n = input()
c = 0
f = False

if n[0] == "R" and n[1]=="R":
  c=2
  f = True
if n[1] == "R" and n[2] == "R":
  c=2
  f = True

if n[1] == "R" and n[0] == "R" and n[2] == "R":
  c= 3
if f == False:
  if n.count("R") == 0:
    c = 0
  else:
    c = 1

print(c)

Solution (Python):
s=list(input())
cnt=0
ans=0
for i in range(len(s)):
    if s[i]=="S":
        cnt+=1

if cnt==1 and s[1]=="S":
    ans=1
else:
    ans=3-cnt
print(ans)

Solution (Python):
a=input()
flag=False
ans=0
hold=0
for i in range(3):
    if a[i]=='R' and not flag:
        ans=1
        flag=not flag
        hold=max(hold,ans)

    elif a[i]=='R' and flag:
        ans+=1
        hold=max(hold,ans)

    else:
        ans=0
        flag=False


print(hold)

Solution (Python):

import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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 not 'R' in S:
    print(0)
elif S[1] == "S":
    print(1)
else:
    print(S.count('R'))

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

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

Solution (Python):
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(max(ans,cnt))

Solution (Python):
S = str(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):
n = input()
count = 0
for i in range(3):
    if i == 0:
        if n[i] == "R":
            count+=1
    else:
        if n[i] == "R" and count == 0:
            count+=1
        elif n[i] == "R" and n[i-1] == "R" and count > 0:
            count += 1
print(count)

Solution (Python):
S = input()
M = 0
count = 0
for i in range(0,3):
  if S[i] == 'R':
    count = count + 1
    if i == 2:
      M = count
  else:
    if M < count:
      M = count
      count = 0
print(M)

Solution (Python):
import re

n = [s for s in input()]
i = 0
renzoku = 0

for j in n:
    if (j == 'R'):
        i += 1 
    else:
        if(renzoku <= i):
            renzoku = i
        i = 0

if(renzoku < i):
   renzoku = i
print(renzoku)

Solution (Python):
import numpy as np

S = np.array(list(input()))

count=0
if S[0] == "R":
    count+=1

if S[1] == "R":
    count+=1
elif S[2] == "S":
    count+=0
else:
    count=0
    
if S[2] == "R":
    count+=1
    
    
print(count)

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

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

Solution (Python):
S = input()
if S =="RRR":
    print("3")
elif S =="RRS" or S == "SRR":
    print("2")
elif S == "SSR" or S == "SRS" or S == "RSS" or S == "RSR":
    print("1")
elif S == "SSS":
    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()

cnt = 0
ans = 0
for i in range(3):
    if s[i] == 'R':
        cnt += 1
    else:
        cnt = 0
    ans = max(ans, cnt)
print(ans)

Solution (Python):
w = input()
c = 1

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

Solution (Python):





def p(X):
    print(X)

N = input()
S = [str(c) for c in N]

count = 0

if S.count('R') >= 1:
    if S[1] == 'S':
        if S.count('R') ==2:
            count = 1
        else:
            count = 1
    else:
        count = S.count('R')

print(count)

Solution (Python):
S = input()
ans = 0
tmp = 0
for i in range(3):
  if(S[i] == "R"):
    tmp += 1
  else:
    ans = max(ans,tmp)
    tmp = 0
ans = max(ans,tmp)
print(str(ans))

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()
c = 0
mx = 0
for i in range(len(s)):
  if s[i]=='R':
    c += 1
  else:
    if c>mx:
      mx = c
    c = 0
if c>mx:
  mx = c
print(mx)

Solution (Python):
main=input().rstrip()
count=0
flag=0
for i in range(3):
    if main[i]=='R' and flag==0:
        count+=1
    elif main[i]=='R' and flag==1:
        count=0
        count+=1
        flag=0
    else:
        flag=1
print(count)

Solution (Python):
S=input()
SL=list(S)
count = 0
if SL.count('R') == 3:
    print(3)
elif SL.count('R') ==2:
    if S.count('RR')==1:
        print(2)
    else:
        print(1)
else:
    print(SL.count('R'))

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

Solution (Python):
s=input()

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


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

print(cnt)

Solution (Python):
from sys import stdin

S = stdin.readline().rstrip()

cnt = 0
tmp = 0


for x in list(S):
    if x == "R":
        tmp = tmp + 1
    elif x == "S":
        tmp = 0

    if tmp > cnt:
        cnt = tmp

print(cnt)

Solution (Python):
c = input()
c = [char for char in c]
count = 0
c1 = []
for i in c:
    if(i=='R'):
        count+=1
        c1.append(count)
    elif(i=='S'):
        count=0
        c1.append(count)
print(max(c1))

Solution (Python):
w = input()

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

else:
    print(w.count("R"))

Solution (Python):
a = input()

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

Solution (Python):
z=[]
a=input()
for i in a:
    z.append(i)

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

Solution (Python):
S = input()

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

Solution (Python):
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)
    else:
        print(1)

Solution (Python):
S = input()

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

Solution (Python):
S = input()

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

Solution (Python):
s = input()
count = s.count('R')

if count >= 2:
    if s[1] == 'R':
        print(count)
    else:
        print(1)
else:
    print(count)

Solution (Python):
S = input()

n = S.count("R")

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

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

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

Solution (Python):
s = list(input())
n, n2 = 0, 0
for i in range(3):
  if s[i] == "R":
    n += 1
    if n2 < n:
      n2 = n
  else:
    n = 0
print(n2)

Solution (Python):
s = input().upper()
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):
temp = str(input())
count = 0
max_count = 0 

for i in temp:
  if i == 'R':
    count = count + 1
    max_count = count
  else:
    if max_count < count:
      max_count = count
    count = 0
    
print(max_count)

Solution (Python):
csl = input()
count = 0
back = 0

csl[0]

for i in range(3):
    if 'R' == csl[i]:
        count += 1

if count == 2:
    if 'S' == csl[1]:
        count = 1

print(count)

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.count("RRR") == 1 :
    print("3")
elif S.count("RR") == 1 :
    print("2")
else :
    if S.count("R") >= 1 :
        print("1")
    else :
        print("0")

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

Solution (Python):
S = input()

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

Solution (Python):
s=list(input())
ans=0
if s[0]=="R" :
    ans=1
    if s[1]=="R" :
        ans=2
        if s[2]=="R" :
            ans=3

elif s[0]=="S" :
    ans=0
    if s[1]=="R" :
        ans=1
        if s[2]=="R" :
            ans=2
    elif s[1]=="S" :
        ans=0
        if s[2]=="R" :
            ans=1
print(ans)

Solution (Python):
import sys
import math

cnt = 0

S = input()
S_list = list(S)

if S_list[0] == 'R':
    SB = 'R'
else:
    SB = 'S'

for s in S_list:
    if SB == s and s == 'R':
        cnt += 1
    elif s == 'R':
        cnt = 1

    SB = s

print(cnt)

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):
x = list(str(input()))
for i in range(3):
    if x[i] == 'R':
        x[i] = 1
    else:
        x[i] = 0
ans = x[0] + x[1] + x[2]
if (x[0] == 1 or x[2] == 1) and x[1] == 0:
    print(1)
else:
    print(ans)

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):
weather = "S" + input()
candicate = []
ans = 0
for i in range(1, 4):
  if weather[i] == "R":
    if weather[i-1] == "S":
      candicate.append(ans)
      ans = 1
    else:
      ans += 1
candicate.append(ans)
print(max(candicate))

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

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

Solution (Python):
import sys, math


if(__name__ == "__main__"):
    SSS =  input()
    if(SSS=="RRR" ):
        print(3)
    elif("RR" in SSS):
        print(2)
    elif("R" in SSS):
        print(1)
    else:
        print(0)

Solution (Python):
s = input()

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

Solution (Python):
l=list(input())
c=0
r=0
for i in range(len(l)):
    if l[i]=="S":
        c=0
    else:
        c+=1
        r=max(r,c)
print(max(c,r))

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

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

Solution (Python):
s=input()


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 = input()
if s == 'RRR':
  print(3)
elif s[0:2] == 'RR' or s[1:3] == 'RR':
  print(2)
elif 'R' in s:
  print(1)
else:
  print(0)

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

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

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

Solution (Python):
def main():
    s = list(str(input()))
    if s.count('R') == 3:
        print(3)
        return
    elif s.count('R') == 2 and s[1] == 'S':
        print(1)
        return
    elif s.count('R') == 2:
        print(2)
        return
    elif s.count('R') == 1:
        print(1)
        return
    else:
        print(0)
        return
main()

Solution (Python):
param_str = list(str(input()))

if param_str.count('R') == 2:
  if param_str[1] == 'S':
    print(1)
  else:
    print(2)
else:
  print(param_str.count('R'))

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

Solution (Python):
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[1] == 'R' and S[2] == 'R' and S[0] == 'R':
    cnt = 3

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

print(cnt)

Solution (Python):
S = input()

if 'RRR' in S:
  count = 3
elif 'RR' in S:
  count = 2
elif 'R' in S:
  count = 1
else:
  count = 0

print(count)

Solution (Python):
S = str(input())
ind = [i for i in range(3) if S[i] == 'R']

if len(ind) == 3:
  ans = 3
elif len(ind) == 2:
  if ind == [0, 1]:
    ans = 2
  elif ind == [0, 2]:
    ans = 1
  elif ind == [1, 2]:
    ans = 2
else:
  ans = len(ind)
print(ans)