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

rs = [len(x) for x in re.findall("R{1,}", s)]

if rs == []:
    print(0)
else:
    print(max(rs))

Solution (Python):
def main():
    S = 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)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
s1, s2, s3 = str(input())
if s1 == "R":
  if s2 == "S":
    result = 1
  else:
    if s3 == "S":
      result = 2
    else:
      result = 3
else:
  if s2 == "S":
    if s3 == "S":
      result = 0
    else:
      result = 1
  else:
    if s3 == "S":
      result = 1
    else:
      result = 2

print(result)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    s = input()
    if s[0] == "R":
        if s[1] == "R":
            if s[2] == "R":
                print(3)
            else:
                print(2)
        else:
            print(1)
    elif s[1] == "R":
        if s[2] == "R":
            print(2)
        else:
            print(1)
    elif s[2] == "R":
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
S = input()
count = 0
max_count = 0
for i in range(len(S)):
  if S[i] == 'R':
    count += 1
    max_count = count
  else:
    count = 0

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

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

Solution (Python):
S = input()

count = S.count("R")

if (count == 3) or (count == 1) or (count == 0):
    print(count)
elif S != "RSR":
    print(count)
else:
    print(1)

Solution (Python):
s = input()
lists = list(s)
count = 0
saidai = 0

for i in range(3):
    if lists[i] == 'R':
        count = count+1
        saidai = max(count, saidai)
    else:
        count = 0

print(saidai)

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

data = sys.stdin.readline()
res = 0
if "R" == data[1]:
    if "R" == data[0]:
        if "R" == data[2]:
            res = 3
        else:
            res = 2
    else:
        if "R" == data[2]:
            res = 2
        else:
            res = 1
else:
    if "R" == data[0] or "R" == data[2]:
        res = 1

print(res)

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()
    c = 0
    if s[0] == s[1] == s[2] == "R":
        print(3)
        return
    if s[0] == s[1] == "R" or s[1] == s[2] == "R":
        print(2)
        return
    if s[0] == s[1] == s[2] == "S":
        print(0)
        return

    print(1)
    return

main()

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

Solution (Python):
S = input()

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

Solution (Python):
s=input()

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

Solution (Python):
x=input()

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

Solution (Python):
S = input()
r_num = 0
flag = True

for s in S:
    if s == 'R' and flag:
        r_num += 1
    elif s == 'R' and (flag == False):
        if r_num == 0:
            r_num += 1
        flag = True
    else:
        flag = False

print(r_num)

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

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

ans = 0
for i in S:
    if i == "R":
        ans += 1
    
if S[1] == "S" and S[2] == "R" and S[0] == "R":
    print(1)
elif ans == ans:
    print(ans)
else:
    print(0)

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

print(c)

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

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

Solution (Python):
import sys,math
from collections import deque,defaultdict
import operator as op
from functools import reduce
sys.setrecursionlimit(10**6) 

I=sys.stdin.readline

 


def ii():
	return int(I().strip())
def li():
	return list(map(int,I().strip().split()))
def mi():
	return map(int,I().strip().split())

def ncr(n, r):
    r = min(r, n-r)
    numer = reduce(op.mul, range(n, n-r, -1), 1)
    denom = reduce(op.mul, range(1, r+1), 1)
    return numer // denom

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x





	

def main():
	s=I().strip()
	arr=s.split("S")
	ans=0
	for i in arr:
		ans=max(ans,len(i))
	print(ans)

	













	
	
	






		







		
		
	
		

	







		









if __name__ == '__main__':
	main()

Solution (Python):
S=list(input())
n=0
x=0
for i in range(3):
    if S[i]=='R':
        n+=1
    else:
        if x<n:
            x=n
        n=0
if x!=0:
    print(x)
else:
    print(n)

Solution (Python):
s = list(input().strip())
s.append("S")
t = 0
t_rev = 0

for i in range(4):
    if s[i] == "R":
        t += 1
    elif s[i] == "S":
        t_rev = max(t, t_rev)
        t = 0

print(t_rev)

Solution (Python):
import sys

S = input()

r_num = S.count("R")
if r_num == 0:
    print(0)
    sys.exit()
if r_num == 1:
    print(1)
    sys.exit()
if r_num == 2:
    if S[1] == "S":
        print(1)
    else:
        print(2)
if r_num == 3:
    print(3)

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

Solution (Python):
li = input()
count = 0
row = 0
if li[0] == "R":
  count += 1
  row = 1
if li[1] == "R":
  if row == 1:
    count += 1
  else:
    row = 1
    count = 1
else:
  row = 0

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

Solution (Python):
s=input()
ans=0
b='R'
for a in s:
    if a=='R' and b=='R':
        ans+=1
    elif a=='R':
        ans=1
    b=a
print(ans)

Solution (Python):
s = list(input())
if s == ["R","S","R"]:
    print(1)
    exit()
else:
    print(s.count("R"))

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):
W = input()
cnt = 0
if W[0]=="R":
  if W[1]=="R":
    if W[2]=="R": cnt=3
    else: cnt=2
  else: cnt=1
else:
  if W[1]=="R":
    if W[2]=="R": cnt=2
    else: cnt=1
  else:
    if W[2]=="R": cnt=1
    else: cnt=0
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):
S=input()
c=0
d=0
if S[0]=="R":
	c+=1
	d=c
else:
	c=0
if S[1]=="R":
	c+=1
	d=c
else:
	c=0
if S[2]=="R":
	c+=1
	d=c
else:
	c=0
print(d)

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[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):
s=input()
c=0
if s=='RRR':c+=3
elif s=='RRS' or s=='SRR':c+=2
elif s=='RSS' or s=='SRS' or s=='SSR' or s=='RSR':c+=1
else:c==0
print(c)

Solution (Python):

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

Solution (Python):



import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """RRS"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """SSS"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """RSR"""
        output = """1"""
        self.assertIO(input, output)


def resolve():
    S = input()
    if S.count("R") == 0:
        print("0")
    elif S.count("R") == 3:
        print("3")
    elif S.count("R") == 1:
        print("1")
    elif "RR" in S:
        print("2")
    else:
        print("1")


if __name__ == "__main__":
    
    resolve()

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()
rainy_cnt={"SSS":0,"SSR":1,"RSS":1,"SRS":1,"RSR":1,"SRR":2,"RRS":2,"RRR":3}
print(rainy_cnt[S])

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

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

Solution (Python):
S = input()
if S == 'RSR':
    renzoku = 1
else:
    renzoku = 0
    for si in S:
        if si == 'R':
            renzoku += 1

print(renzoku)

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

for i in range(len(S)):
    if ans==0 and S[i]=="R":
        ans=1
for i in range(len(S)-1):
    if S[i]=="R" and S[i+1]=="R":
        ans+=1

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):

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)

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

Solution (Python):
def function(X):
    if X=='SRS':
        return 1
    elif X[1] == 'S':
        if (X[0] == 'R') or (X[2] == 'R'):
            return 1
        else:
            return 0
    else:
        if (X[0] == 'R') and (X[2] == 'R'):
            return 3
        elif (X[0] == 'R') or (X[2] == 'R'):
            return 2
        else:
            return 0


if __name__ == '__main__':
    X = input()
    print(function(X))

Solution (Python):
mod = 10**9+7
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return [list(map(int, input().split())) for _ in range(n)]

S = input()
count = 0
max = 0

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

Solution (Python):
S=input()
a=list(S)
r=0
s=[]
for i in a:
  if i=="R":
    r+=1
  elif i=="S":
    s.append(r)
    r=0
s.append(r)
s.sort()
print(s[-1])

Solution (Python):
S = input()

L = []
ans = 0
for i in range(len(S)):
  if S[i] == "R":
    ans += 1
  else:
    L.append(ans)
    ans = 0
L.append(ans)
print(max(L))

Solution (Python):
S = input()

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

Solution (Python):
s = input()

Rnum=s.count('R')
ans=1
if Rnum==3:
    ans=3
elif Rnum==0:
    ans=0
elif Rnum==2 and s!='RSR':
    ans=2
elif Rnum==1:
    ans=1

print(ans)

Solution (Python):
S = str(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] == 'R' and S[1] == 'S' and S[2] == 'R':
    print(1)
elif S[0] == 'R' and S[1] == 'S' and S[2] == 'S':
    print(1)
elif S[0] == 'S' and S[1] == 'R' and S[2] == 'R':
    print(2)
elif S[0] == 'S' and S[1] == 'R' and S[2] == 'S':
    print(1)
elif S[0] == 'S' 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[1:2]=="R":
  if s[0:1]=="R"and s[2:3]=="R":
    print(3)
  elif s[0:1]=="S"and s[2:3]=="S":
    print(1)
  else:
    print(2)
elif "R" in s:
  print(1)
else:
  print(0)

Solution (Python):



import collections
import sys
import copy
import re
import math


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    si = S()
    ans = 0
    for i, s in enumerate(si):
        if s == "R":
            if ans > 0 and si[i-1] == "R":
                ans += 1
            elif ans==0:
                ans += 1
                
    print(ans)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

import sys




s = input()

def sol(s):

    if s == "RRR":
        return 3

    

    if (s[0] == s[1] == "R") or (s[1] == s[2] == "R"):
        return 2

    if "R" in s:
        return 1

    return 0

print (sol(s))

Solution (Python):
S = input()

cnt = 0

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

Solution (Python):
if __name__ == "__main__":
    S = input()
    S = list(S)

    count = 0
    maxc = 0
    for i in S:
        if i == 'R':
            count += 1
            if maxc < count:
                maxc = count
        else:
            if maxc < count:
                maxc = count
            count = 0

    print(maxc)

Solution (Python):
s=input()
flg = 0
cnt = 0
if s == "SSS":
    print(0)
    exit()
if s[1] == "S":
    flg = 1
for i in range(3):
    if s[i] == "R":
        cnt += 1
if cnt >= 2 and flg == 1:
    print(cnt -1)
else:
    print(cnt)

Solution (Python):
S = input()

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

print(ans)

Solution (Python):
def main():
    s = input()
    count = 0
    ans = 0

    for i in s:
        if i == 'R':
            count += 1
            if ans < count:
                ans = count
        else:
            if ans < count:
                ans = count
            count = 0

    print(ans)
if __name__ == "__main__":
    main()

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

Solution (Python):
s = input()
cnt=0
if s=='SSS':
    print(0)
elif s=='SRR'or s=='RRS':
    print(2)
elif s=='RSS'or s=='SRS'or s=='SSR' or s=='RSR':
    print(1)
elif 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 == "RSR":
    print(1)
elif S == "SRS":
    print(1)
elif S == "SSR":
    print(1)
elif S == "RSS":
    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 S[1:2] == 'S':
    if 'R' in S:
        print(1)
    else:
        print(0)
else:
    if not 'S' in S:
        print(3)
    else:
        if S == 'SRS':
            print(1)
        else:
            print(2)

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

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

Solution (Python):
S = input()


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

Solution (Python):
s=input()
r=0
i=0
if s[i]=='R':
  r=r+1

i=i+1
if s[i]=='R':
  r=r+1
  i=i+1
  if s[i]=='R':
    r=r+1
elif s[i+1]=='R' and r==0:
  r=1
  
print(r)

Solution (Python):


s=input()
count=1

if s=='RRR':
    count=3
elif s=='RRS' or s=='SRR':
    count=2
elif s=='SSS':
    count=0
print(count)

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

Solution (Python):
w = input()

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

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

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

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

Solution (Python):

import re


weathers = input()

if (weathers == "RRR"):
  print(3)
  exit()

if (re.match(r'.*RR.*', weathers)):
  print(2)
  exit()

if (re.match(r'.*R.*', weathers)):
  print(1)
  exit()

print(0)

Solution (Python):
import sys
s = sys.stdin.readline().rstrip("\n")
ans = {'SSS': 0,
 'SSR': 1,
 'SRS': 1,
 'SRR': 2,
 'RSS': 1,
 'RSR': 1,
 'RRS': 2,
 'RRR': 3}
print(ans[s])

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

Solution (Python):

import re
S = input()
mmm = re.findall("RRR", S)
mm = re.findall("RR", S)
m = re.findall("R", S)
if mmm:
    print(3)
elif mm:
    print(2)
elif m:
    print(1)
else:
    print(0)

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

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

if s[1]=="R" and s[2]=="R":
  ans=2

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

print(ans)

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

s = str(input()).replace("\n", "")

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=="SSS":
    print(0)
elif s=="SSR" or s=="RSS" or s=="SRS" or s=="RSR":
    print(1)
elif s=="SRR" or s=="RRS":
    print(2)
else:
    print(3)

Solution (Python):
S = input()
ans = S.count('R')

if ans == 2 and S[1] == 'S':
    ans = 1

print(ans)

Solution (Python):
import sys
import bisect as bi
import math
from collections import defaultdict as dd
input=sys.stdin.readline

def cin():
    return map(int,sin().split())
def ain():            
    return list(map(int,sin().split()))
def sin():
    return input()
def inin():
    return int(input())
for _ in range(1):
    s=input().strip()
    n=len(s)
    ans=0
    if('R' in s):
        p=s.index('R');
        c=1
        for i in range(p+1,n):
            if(s[i]=='R'):
                c+=1
            else:
                ans=max(ans,c)
                c=0
        ans=max(ans,c)
    print(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 = list(input())
a = S.count("R")
ans = a
if(S==["R","S","R"]):
    ans = 1
print(ans)

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

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 = str(input().split())

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)
    exit()

if S == 'SRR' or S == 'RRS':
    print(2)
    exit()

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

print(0)

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):
s = input()
if s == "RRR":
  print(3)
elif s == "SSS":
  print(0)
elif s == "RRS" or s == "SRR":
  print(2)
else:
  print(1)

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

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

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

print(ans)

Solution (Python):
s = input()

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

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

print(ans)

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

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

Solution (Python):
n = input()
c= 0
mx = 0
for i in n:
	if i=='S':
		c = 0
	else:
		c+=1
	if mx<c:
		mx=c
print(mx)

Solution (Python):

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

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

Solution (Python):
s=input()
s=list(s)
if s[1]==s[2] and s[0]==s[1] and s[0] == "R":
	print(3)
elif s[1]==s[2] and s[0]==s[1] and s[0] != "R":
	print(0)
elif (s[1]==s[2] or s[0]==s[1])and s[1]=="R":
	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()
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):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


S = input()
cnt = 0
before = 1

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

Solution (Python):
s = input()
s = s.split('S')
print(len(max(s)))

Solution (Python):
S=input()
count=0
for i in range(len(S)):
    cur_count=1
    if S[i]=="R":
        for j in range(i+1,len(S)):
            if S[j]!=S[i]:
                break
            cur_count+=1
        if cur_count > count : 
                count = cur_count
    
print(count)

Solution (Python):

S = input()
count = 0
count2 = 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()


con=False

ans=0
for i in range(3):
  if(s[i]=="R" and con):
    ans+=1
  elif(s[i]=="R" and not(con)):
    ans=1
    con=True
  else:
    con=False
      
print(ans)

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

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

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

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)
elif s == "RRR":
    print(3)

Solution (Python):
S =input()

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

print(cntmax)

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

Solution (Python):

S = str(input())

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

Solution (Python):
def main():
    s = input()
    if s == "RSR":
        print(1)
    else:
        cnt = 0
        for i in s:
            if i == "R":
                cnt += 1

        print(cnt)
    
if __name__ == "__main__":
    main()

Solution (Python):
s = input()

ans = 0
hoge = 0
for i in range(3):
    if s[i] == "R":
        hoge += 1
    else:
        if hoge > ans:
            ans = hoge
        hoge = 0
    if i == 2:
        if hoge > ans:
            ans = hoge
        hoge = 0
print(ans)

Solution (Python):
Word = input()

counter=0
maxc = 0

for i in range(len(Word)):
    if 'R'==Word[i]:
        counter +=1
        maxc = max(counter, maxc)
    else:
        counter=0
print(maxc)

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

Solution (Python):
S = input()

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

Solution (Python):
s=input()


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

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

Solution (Python):
ws = input()

if ws.count('S') == 3:
    print(0)
elif ws.count('S') == 2:
    print(1)
elif ws.count('S') == 1:
    if ws.index('S') == 1:
        print(1)
    else:
        print(2)
else:
    print(3)

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