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):
S1,S2,S3 =map(str,input())
if S1 == "R"and S2 == "R" and S3 =="S":
  print(2)
elif S1 == "R" and S2 == "R" and S3=="R":
    print(3)
elif S1 == "S" and S2 == "R" and S3=="R":
    print(2)
elif S1=="S"and  S2=="S"and S3=="S":
    print(0)
else:
    print(1)

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

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

Solution (Python):
s = input()
a = s.count("RRR")
b = s.count("RR")
if a == 1:
    print(3)
elif b == 1:
    print(2)
else:
    if s.count("R") > 0:
        print(1)
    else:
        print(0)

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

Solution (Python):
S = [s for s in input()]

S0 = S[0]
S1 = S[1]
S2 = S[2]

if S0 == S1 == S2 == 'R':
    count = 3

elif S0 == S1 == 'R' or S1 == S2 == 'R':
    count = 2

elif S0 == S1 == S2 == 'S':
    count = 0

else:
    count = 1

print(count)

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

Solution (Python):
S = input()
ans = 0
if S[1] != "R" and "R" in S:
    ans = 1
elif S[1] == "R":
    if S[0] == "R" and S[2] == "R":
        ans = 3
    elif S[0] == "R" or S[2] == "R":
        ans = 2
    else:
        ans = 1    
elif "R" in S:
    ans = 1
print(ans)

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

Solution (Python):
def main():
    S = input()
    rs = 'R'*len(S)
    ans = 0

    for i in range(len(S)):
        if rs[0:len(rs)-i] in S:
            ans = len(S) - i
            break
  
    return ans

if __name__ == '__main__':
    print(main())

Solution (Python):
weather = input()

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

Solution (Python):
import sys

x = input()

if len(x) != 3 :
    sys.exit()

k=0

for k in range(2):
    if x[k] != "R":
        if x[k] != "S":
            print("無効な値です")
            sys.exit()
    k=k+1


i=0
if x[0]=="R":
    i = i+1
    if x[1]=="R":
        i = i+1
        if x[2]=="R":
            i = i+1
elif x[1]=="R":
    i = i+1
    if x[2]=="R":
        i = i+1
elif x[2] =="R":
    i = i+1    

print(i)

Solution (Python):
S = input()
x = 0
if S == 'RSR':
    print(1)
else:
    for i in S:
        if i == 'R':
            x += 1
    print(x)

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

Solution (Python):
s=input()

cnt=0

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

if(cnt!=2):
    print(cnt)
elif(s=="RSR"):
    print(1)
else:
    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()
c = 0
r = "R"
while r in S:
    c += 1
    r += "R"
print(c)

Solution (Python):
import re
S = input()
if re.search(r'R{3}', S):
  a = 3
elif re.search(r'R{2}', S):
  a = 2
elif re.search(r'R{1}', S):
  a = 1
else:
  a = 0
print(a)

Solution (Python):
S = input().strip()
print(max([len(i) for i in S.split('S')]))

Solution (Python):
s = input()

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

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

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

Solution (Python):
from sys import stdin,stdout
input = stdin.readline
def write(n,sep="\n"):
	stdout.write(str(n))
	stdout.write(sep)
def gil():
	return list(map(int, input().split()))

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

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

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

a = S.count('RR')
b = S.count('R')
c = S.count('RRR')

if c >= 1:
  print(3)
elif a >= 1:
  print(2)
elif b >= 1:
  print(1)
else:
  print(0)

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

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

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

Solution (Python):
m=input()
s=list(m)
a=[]
n=len(s)
j=0
while (j<n):
    x=0
    if s[j] == 'R':
        y=j+1
        for k in range (j,n):
            y=k+1
            if s[k]=='S':
                y=k+1
                break
            else:
                x+=1
        a.append(x)
        j=y

    else:
        j+=1

a.sort(reverse=True)
if len(a)==0:
    print (0)
else:
    print(a[0])

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

cnt = 0

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

print(cnt)

Solution (Python):
x = input()

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

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

print(cnt)

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

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

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):
s = input()

if "SSS" in s:
    print(0)
elif "RRR" in s:
    print(3)
elif "SSR" in s:
    print(1)
elif "SRR" in s:
    print(2)
elif "SRS" in s:
    print(1)
elif "RSS" in s:
    print(1)
elif "RSR" in s:
    print(1)
elif "RRS" in s:
    print(2)

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):
def abc175_a():
    s = input()
    cnt = 0
    result = 0

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

    print(result)

if __name__ == '__main__':
    abc175_a()

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,b,c = input()
count = 0

if a == "R" and b == "R" and c == "R":
  count = 3
elif (a == "R" and b == "R") or(b == "R" and c == "R"):
  count = 2
elif a == "R"or b =="R" or c == "R":
  count = 1
else:
  count = 0
  
print(count)

Solution (Python):
S  = list(input())
count = [0]
a = 0
for i in range(3):
    if S[i] == 'R':
        count[a] += 1
    else:
        count.append(0)
        a += 1

print(max(count))

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

count = 0
l = [0]

for i in range(len(s)):
    if s[i] == 'R':
        l.append(1)
        try:
            if s[i+1] == 'R':
                count += 1
                l.append(count+1)
            else:
                l.append(count)
                count = 0
        
        except IndexError:
            break

print(max(l))

Solution (Python):
S = input()

v = 0
ans = 0
for s in S:
    if s == "R":
        v += 1
        ans = max(ans, v)
    else:
        v = 0
print(ans)

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

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

Solution (Python):
a=input()

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

Solution (Python):
s = input()
r = s.count("R")

if r == 2:
	if s[1]=="R":
		print(2)
	else:
		print(1)
else:
	print(r)

Solution (Python):
S = input()
if S.count('RRR') == 1:
    print(3)
elif S.count('R') == 2 and S.count('RR') == 1:
    print(2)
elif S.count('R') >= 1 and S.count('R') < 3 and S.count('RR') == 0:
    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 = input()
r = 0
ans = 0
for i in range(3):
    if S[i] == 'R':
        r = r + 1
    else:
        if r > ans:
            ans = r
            r = 0
if r > ans:
    ans = r

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()
a=s[0]
b=s[1]
c=s[2]
if a==b==c=='R':
  print(3)
elif a==b==c:
  print(0)
elif a==b=='R' or b==c=='R':
  print(2)
else:
  print(1)

Solution (Python):
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
s=input()
ans=0
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]!="R" or s[1]=="R" and s[2]=="R" and s[0]!="R":
    print(2)
elif s[0]=="R" or s[1]=="R" or s[2]=="R":
    print(1)
else:
    print(0)

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

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

if S[1] == 'S' and count > 1:
    count -= 1

print(str(count))

Solution (Python):
n = 0
S = input()
for i in range(0,len(S)):
    if i==0:
        if S[i]=="R":
            n += 1
    if i==1:
        if S[i]=="R":
            n += 1
        else:
            n = 0
    if i==2:
        if S[i]=="R":
            n += 1
        else:
            continue
    if S == "RSS":
        n = 1
print(n)

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

Solution (Python):
li = list(map(str, input()))
c=0
for i in range(3):
  if li[i]=='R':
    c=c+1
    if i!=2 and li[i+1]!='R':
      print(c)
      exit()
print(c)

Solution (Python):
s = input()

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

if s[1] == "S" and cnt == 2:
    print(1)
else:
    print(cnt)

Solution (Python):
x, y, z = input()
sum=0
if x=='R' and y=='R' and z == 'R':
    print(3)
elif (x=='R' and y=='R') or (y=='R' and z =='R'):
    print(2)
elif x=='R' or y=='R' or z=='R':
    print(1)
else:
    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") == 2:
    print(2)
elif s.count("R") == 3:
    print(3)

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

Solution (Python):
S = input()

if S == 'RRR':
  print('3')
  
elif S == 'SSS':
  print('0')
  
elif S == 'RRS':
  print('2')

elif S == 'SRR':
  print('2')

elif S == 'RSS' or 'SRS' or 'SSR':
  print('1')
  
elif S == 'SSS':
  print('0')

Solution (Python):
S = input()

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

Solution (Python):
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(1)
if s == "RRS":
    print(2)
if s == "RRR":
    print(3)

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

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

Solution (Python):
s = input()

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

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

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

Solution (Python):
count=0
S=input()
Rain = S.split('S')
for i in range(len(Rain)):
  Rain[i] = len(Rain[i])
count = max(Rain)
print(count)

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 == 'RSS':
  print(1)
elif S == 'SRS':
  print(1)
elif S == 'SSR':
  print(1)
elif S == 'SSS':
  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()
L=list(S)

count = 0

if L.count('S') == 3:
    print(0)
elif L.count('S') == 2:
    print(1)
elif L.count('S') == 1:
    if L[1] == 'S':
        print(1)
    else:
        print(2)
else:
    print(3)

Solution (Python):
a = input()

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

Solution (Python):
from math import *
import sys,bisect,copyreg,copy,statistics,os
def inp(): return sys.stdin.readline().strip()
def IIX(): return (int(x) for x in sys.stdin.readline().split())
def II(): return (int(inp()))
def LI(): return list(map(int, inp().split()))
def LS(): return list(map(str, inp().split()))
def L(x):return list(x)
def out(var): return sys.stdout.write(str(var))
def binary_search(arr, x): 
    left = 0
    right = len(arr) - 1
    mid = 0
    while left <= right:   
        mid = (left + left) // 2
        if arr[mid] < x: 
            left = mid + 1
        elif arr[mid] > x: 
            right = mid - 1
        else: 
            return mid
    return -1

s=inp()
c=0
if s.count("R")==1:
    out(1)
else:
    for i in range(3):
        if s[i]=='R':
            c+=1
        elif s[i]=='S' and i!=2:
            c= 0
    out(c)

Solution (Python):
S = input('')
num = 0
num_rev = [0,0,0]
for i in range(3):
    if S[i] == 'R':
        num += 1
    elif S[i] == 'S':
        num_rev[i] = num
        num = 0
        

print(max(num,num_rev[0],num_rev[1],num_rev[2]))

Solution (Python):
import re
if __name__ == '__main__':
    s = input()
    m = [len(Rs) for Rs in re.findall('R+', s)]+[0]
    print(max(m))

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

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

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

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 = str(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().strip()
ans = 0
if 'R' in S:
    ans = 1
if 'RR' in S:
    ans = 2
if 'RRR' in S:
    ans = 3
print(ans)

Solution (Python):




s = input()






if s == 'RRR':
    ans = 3
elif s in ('RRS', 'SRR'):
    ans = 2
elif s == 'SSS':
    ans = 0
else:
    ans = 1

print(ans)

Solution (Python):
def main():
    s = input()

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

if __name__ == "__main__":
    main()

Solution (Python):
a=[]
a=list(input())
count=0
for i in range(3):
  if a[i]=='R':
    count+=1
  elif count!=0:
    break
print(count)

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):
we = input()
jud = list(we)
if jud[1] == "R":
	if jud[0] == "R" and jud[2] == "R":
		print(3)
	elif jud[0] == "R" or jud[2] == "R":
		print(2)
	else:
		print(1)
else:
	if jud[0] == "R" or jud[2] == "R":
		print(1)
	else:
		print(0)

Solution (Python):
S = input()
Scnt = S.count('S')
result = 0
result2 = 0

for i in range(3):
    if S[i] == 'R':
        result = result + 1
    else:
        if result2 < result:
            result2 = result
        result = 0
 
if result > result2:
    print(result)
else:
    print(result2)

Solution (Python):

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

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

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

Solution (Python):
s = input()

def result(s):
    count = 0
    max = 0
    if s == 'RRR':
        max = 3
        return max
    elif s == 'SSR':
        max = 1
        return max
    elif s == 'SRR':
        max = 2
        return max
    elif s == "RSR":
        max = 1
        return max
    for i in s:
        if i == 'R':
            count += 1
        else:
            if max < count:
                max = count
            count = 0
    return max
    

print(result(s))

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

Solution (Python):
s = input()

count = 0
max = 0

for c in s:
    if c == "R":
        count += 1
        if count > max:
            max = count
    elif c == "S":
        count = 0


print(max)

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

Solution (Python):
s = input()

ans=0

if s.count("R")>0: ans = 1

if s[:2]=="RR": ans = 2
if s[1:]=="RR": ans = 2

if s == "RRR": ans = 3

print(ans)

Solution (Python):
temthr = input()
tem1, tem2, tem3 = temthr[:1], temthr[1:2], temthr[2:3]
c = 0
if tem1 == "R":
  if tem2 == "R":
    if tem3 == "R":
      print(3)
    elif tem3 == "S":
      print(2)
  elif tem2 == "S":
    print(1)
if tem1 == "S":
  if tem2 == "R":
    if tem3 == "R":
      print(2)
    elif tem3 == "S":
      print(1)
  elif tem2 == "S":
    if tem3 == "R":
      print(1)
    else:
      print(0)

Solution (Python):
def find(s):
  ans=0
  for i in s:
    if i=="R":
      ans+=1
    elif i=="S" and ans>0:
      return ans
  return ans
s=input()
print(find(s))

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

Solution (Python):
a = input()

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

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

Solution (Python):

s = input()
count = 0
ans = 0

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

Solution (Python):
s = input()

counts = []
count = 1
if s.find('R') == -1:
    count = 0
else:
    for a, b in zip(s, s[1:]):
        if a == b and a == 'R':
            count += 1
        else:
            counts.append((a, count))

print(str(count))

Solution (Python):
s = input()
count = 0
max = 0

for i in range(len(s)):
    if s[i] == "R":
        count += 1
        if max < count:
            max = count
    else:
        count = 0

print(max)

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

Solution (Python):


w = input()

ans = 0
tmp_ans = 0
for i in range(len(w)):
    if w[i] == "R":
        tmp_ans += 1
        ans = tmp_ans
    else:
        ans = max(tmp_ans, ans)
        tmp_ans = 0

print(ans)

Solution (Python):
s = input()
a = [str(c) for c in s]

if a.count('R') == 3:
  print(3)
elif a.count('R') == 0:
  print(0)
elif a.count('R') == 1:
  print(1)
elif a.count('R') ==2:
  if a[1] == 'R':
    print(2)
  else:
    print(1)

Solution (Python):
s= input()
k='S'
count=0
for i in s:
  if k=='R' and i=='R':
    count+=1
    k='R'
  elif k=='S' and i=='R':
    count=1
    k='R'
  elif i=='S':
    k='S'
print(count)

Solution (Python):
a, b, c = input()

if b == "R":
  d = 1
  if a == "R":
    d += 1
  if c == "R":
  	d += 1
else:
  d = 0
  if a == "R" or c == "R":
    d += 1
 
print(d)

Solution (Python):
s=input()
count=0
m=0
for i in range(len(s)):
    if s[i]=='R':
        count+=1
    else:
        if count > m :
            m=count
        count=0
if count>m:
  m=count
print(m)

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

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

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

r_cnt = 0
max_r_cnt = 0

for s in S:
    if s == "R":
        r_cnt += 1

    else:
        r_cnt = 0
    max_r_cnt = max(r_cnt, max_r_cnt)

print(max_r_cnt)

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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):
c=str(input())
rnum=c.count('R')

if rnum == int(2):
    r2 = c.count('RR')
    if r2 == int(1):
        print(2)
    else:
        print(1)
else:
    print(rnum)

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

Solution (Python):
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
    elif w == 'S':
        raining = False
        count = 0
    if max < count:
        max = count

print(max)

Solution (Python):


L = []
L.append(input())

if L[0] == 'SSS':
	print(0)
elif L[0] == 'RRR':
	print(3)
elif L[0] == 'SSR' or L[0] == 'SRS':
	print(1)
elif L[0] =='RSS':
	print(1)
elif L[0] == 'SRR' or L[0] == 'RRS':
	print(2)
elif L[0] == 'RSR':
	print(1)

Solution (Python):
import sys

str = sys.stdin.read()

maximum = 0
count = 0

for c in str:
    if 'R' == c:
        count += 1
    else:
        count = 0

    maximum = max(maximum, count)

print(maximum)

Solution (Python):
input_sen=input()
N=0
if input_sen=="RSR":
  N=1
else:
  for i in input_sen:
    if i=="R":
      N+=1
print(N)

Solution (Python):
S = input()

l = len(S)
count = 0

for i in range(l):
    if "R" not in S:
        break
    cur_count = 1

    for j in range(i+1,l):
        if S[i] == "S":
            break
        if (S[i] != S[j]):
            break
        cur_count += 1
    if cur_count > count:
        count = cur_count

print(count)

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

Solution (Python):

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

Solution (Python):


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)


S = input()

len = 0
if 'R' in S:
    len = 1
if 'RR' in S:
    len = 2
if 'RRR' in S:
    len = 3

print(len)

Solution (Python):

import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = readline().decode().rstrip()
if S[0] == 'R' and S[1] == 'S' and S[2] == 'R':  
    print(S.count('R')-1)
else:
    print(S.count('R'))

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

a = 0
for i in range(3):
  if w[i] == "R":
    a += 1

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

Solution (Python):
S = input()


def main():
    r = S.count("R")
    if r == 3:
        ans = 3
    elif r == 2 and S[1] == "R":
        ans = 2
    elif r == 0:
        ans = 0
    else:
        ans = 1
    print(ans)


if __name__ == "__main__":
    main()

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

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

Solution (Python):
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
from math import *

n=nsi()
count=0
o=0
if(n[0]=='R' and n[1]=='S'):
    print(1)
    o=1
if(n[0]=='R' and n[1]=='R' and n[2]=='S'):
    print(2)
    o=1
if(n[0]=='S'and n[1]=='R' and n[2]=='R'):
    print(2)
    o=1
if(n[0]=='R' and n[1]=='R' and n[2]=='R'):
    print(3)
    o=1

for i in n:
    if(i=='R'):
        count+=1

if(count==0):
    print(0)
if(count==1 and o==0):
    print(1)

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

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

Solution (Python):
s = input()

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

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