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

Solution (Python):
w = input()

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

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

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


print(ans)

Solution (Python):
s = input()
cnt = 0
for x in range(2):
    if s[x] == 'R' and s[x+1] == 'R':
        cnt += 1

for x in s:
    if x == 'R':
        cnt += 1
        break

print(cnt)

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

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

Solution (Python):

stri=input()
ans=0
s=0
for i in range(3):
    if stri[i]=="R":
        s+=1
    else:
        if ans<s:
            ans=s
        s=0
if ans<s:
    ans=s
print(ans)

Solution (Python):
str = input()

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

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

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

Solution (Python):
s = input()

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

Solution (Python):
s = input()

if (s == "RRR"):
    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):
A = list(input())

if A[0] == A[1] == A[2] == 'R':
    print(3)
elif A[0] == A[1] == 'R' or A[1] == A[2] == 'R':
    print(2)
elif 'R' in A:
    print(1)
else:
    print(0)

Solution (Python):
from sys import stdin


test = list(stdin.readline().rstrip())

count = [0,0,0]
i=0
before = 'R'

for str in test:
    if str=='R':
        count[i] += 1
    else:
        i = i + 1

print(max(count))

Solution (Python):
s = input()

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

Solution (Python):
s = input()

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

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
from bisect import bisect_left
from itertools import product
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def LF(): return list(map(float, input().split()))
def LC(): return [c for c in input().split()]
def LLI(n): return [LI() for _ in range(n)]
def NSTR(n): return [input() for _ in range(n)]

def array2d(N, M, initial=0):
    return [[initial]*M for _ in range(N)]

def copy2d(orig, N, M):
    ret = array2d(N, M)
    for i in range(N):
        for j in range(M):
            ret[i][j] = orig[i][j]
    return ret


INF = float("inf")
MOD = 10**9 + 7


def main():
    S = input()
    if S == "RRR":
        print(3)
    elif S == "RRS" or S == "SRR":
        print(2)
    elif S == "RSR":
        print(1)
    else:
        print(S.count("R"))
    return


if __name__ == '__main__':
    main()

Solution (Python):
s=input()

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

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
S = input()

if S == 'RSS':
    print(1)
    exit()

tmp = 0
for i in range(len(S)):
    if S[i] == 'R':
        tmp += 1
    else:
        if i == 2:
            break
        else:
            tmp = 0
print(tmp)

Solution (Python):
a=input()

cnt=0

for i in a:
  if i=='R':
    cnt+=1

if cnt==2 and len(a)==3:
  if a[0]=='R' and a[2]=='R':
    cnt=1

print(cnt)

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

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

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

    rc_cnt = 0
    rc_ans = 0

    for s in sr:
        if (s == 'S'):
            rc_cnt = 0
        elif (s == 'R'):
            rc_cnt = rc_cnt + 1
            if (rc_cnt > rc_ans):
                rc_ans = rc_cnt
    
    print(rc_ans)


if __name__ == '__main__':
    main()

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

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

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):
print(len(max((input().split('S')))))

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

Solution (Python):
a = max(input().split("S"))
print(len(a))

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

Solution (Python):
w = input()

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

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

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

print(result)

Solution (Python):
a = input()

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

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

print(ans)

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

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

Solution (Python):
def solve(string):
    return str(max(map(len, string.split("S"))))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Solution (Python):
inn = input()
numR = 0
for c in inn:
    if c == 'R':
        numR += 1
if numR != 2:
    print(numR)
else:
    print(1 if inn[1] == 'S' else 2)

Solution (Python):
inn = input()
numR = 0
for c in inn:
    if c == 'R':
        numR += 1
if numR != 2:
    print(numR)
else:
    print(1 if inn[1] == 'S' else 2)

Solution (Python):
from time import time
def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f


def A(S): 
    nb = 0
    if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb)


@timer
def B():
    ...

@timer
def C():
    ...


S = input()
A(S)

Solution (Python):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

s = S()

cnt = 0
max = 0
for i in s:
    if i == "R":
        cnt += 1
    else:
        if max < cnt:
            max = cnt
        cnt = 0

if max < cnt:
    max = cnt

print(max)

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

Solution (Python):
N = input()
ans = 0
for i in range(1,4):
  p = "R"*i
  if p in N:
    ans = i
print(ans)

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

Solution (Python):
def solve(s):
    if "RRR" in s:
        return 3
    elif "RR" in s:
        return 2
    elif "R" in s:
        return 1
    else:
        return 0

if __name__ == "__main__":
    s = input()
    print(solve(s))

Solution (Python):
ss=str(input())
a=int(ss.count("R"))

if ss=="RSR":
  a=1

print(a)

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):
ss = str(input())
a = int(ss.count("R"))

if ss == "RSR":
  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 = input()
 
if S.count("R") == 2 and S[1] != "R":
  print(1)
  
else:
  print(S.count("R"))

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

Solution (Python):
S = input()[0:3]

i=S.count('RRR')
j=S.count('RR')
k=S.count('R')
l=S.count('RSR')

print(max(i,j,k-l))

Solution (Python):
S = input()
 


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

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

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

Solution (Python):
s = input() + '@'

lst = [1]*len(s)
for i in range(1,len(s)):
  if s[i] == s[i-1]:
    lst[i] = lst[i-1] + 1

ans = 0
for i in range(0,len(s)):
	if s[i] == 'R':
		ans = max(ans,lst[i])

print(ans)

Solution (Python):
import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

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

if __name__ == "__main__":
    solve()

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

count = 0
max = 0

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

print(max)

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

Solution (Python):
Q =input()
if Q.count('R')==3:
    print(3)
elif Q.count('R')==0:
    print(0)
elif Q.count('R')==1:
    print(1)
elif Q.count('R')==2:
    if Q[1] =='S':
        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):
a = input()
b = list(a)
if b[0] == "R":
    if b[1] == "R":
        if b[2] == "R":
            print(3)
        else:
            print(2)
    else:
        if b[2] == "R":
            print(1)
        else:
            print(1)
else:
    if b[1] == "R":
        if b[2] == "R":
            print(2)
        else:
            print(1)
    else:
        if b[2] == "R":
            print(1)
        else:
            print(0)

Solution (Python):
i = input()

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

Solution (Python):
weather = input()

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

Solution (Python):
s = [x for x in input()]
count = 0
max_count = 0

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

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

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

Solution (Python):
s = input()
cnt = 0
if s[1] == 'S':
    if 'R' in s:
        cnt += 1
else:
    cnt += 1
    if s[0] == 'R':
        cnt += 1
    if s[2] == 'R':
        cnt += 1
print(cnt)

Solution (Python):

s = input()
p=s[0]=='R'
q=s[1]=='R'
r=s[2]=='R'

if p and q and r==True:
    print(3)
elif (p and q)or(q and r)==True:
    print(2)
elif p or q or r ==True:
    print(1)
else:
    print(0)

Solution (Python):
S = input().rstrip()
num = 0
mnum = 0
for c in S:
    if c == 'R':
        num += 1
    else:
        num = 0

    if mnum < num:
        mnum = num

print(mnum)

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

    else:
        print(0)


if __name__ == '__main__':
    main()

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

if s == "RRR":
    d = 3
elif s in {"RRS", "SRR"}:
    d = 2
elif s in {"RSR", "RSS", "SSR", "SRS"}:
    d = 1
else:
    d = 0

print(d)

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

if num==2:
    if s=="RSR":
        ans=1
    else:
        ans=2
else:
    ans=num

print(ans)

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

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

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

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

Solution (Python):
S=input()
ans=0
if 'R' in S:
    ans+=1
    if S[0]=='R' and S[1]=='R':
        ans+=1
    if S[1]=='R' and S[2]=='R':
        ans+=1
print(ans)

Solution (Python):
s = input()

ans = 0
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):
print(len(max(input().split('S'))))

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

Solution (Python):
S = str(input())
count = 0
if S == "RRS" or S == "SRR":
    print(2)
elif S == "RSR":
    print(1)
else:
    for i in range(0, 3):
        if S[i] == "R":
            count += 1
    print(count)

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

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

Solution (Python):
n = input()
ans = 0
temp = 0
for i in range(len(n)):
    if n[i] == "R":
        temp += 1
        ans = max(temp,ans)
    else:
        temp = 0

print(ans)

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

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

Solution (Python):
s = input()
found = 0
ans = 0
if s[0] == 'R':
    ans+=1
    if s[1] == 'R':
        ans += 1
        if s[2] == 'R':
            ans += 1
elif s[1] == 'R':
    ans +=1
    if s[2] == 'R':
        ans+=1
elif s[2] == 'R':
    ans+=1
print(ans)

Solution (Python):
s=input()
ans=0
if s[0]=='R':
    ans=1
    if s[1]=='R':
        ans+=1
        if s[2]=='R':
            ans+=1
elif s[1]=='R':
    ans+=1
    if s[2]=='R':
        ans+=1
elif s[2]=='R':
    ans+=1
print(ans)

Solution (Python):
n = input()
r = 0
Tr = 0
for i in n:
    if i == "R":
        r += 1
        Tr = r
    elif i == "S":
        r = 0
print(Tr)

Solution (Python):
def rainyseason(S):
    days = 0
    max_days = 0
    flag = 0
    for i in range(len(S)):
        if S[i] == 'R':
            days += 1
            flag = 1
        elif S[i] == 'S' and flag == 1:
            if days > max_days:
                max_days = days
                days = 0
                flag = 0
    if days > max_days:
        max_days = days
    return max_days

if __name__ == '__main__':
    S =str(input())
    print(rainyseason(S))

Solution (Python):
S = input()
rain_d = 0
max_rain_d = 0
for s in S:
    if s == 'R':
        rain_d += 1
        max_rain_d = rain_d
    elif s == 'S':
        rain_d = 0
print(max_rain_d)

Solution (Python):
l = list(input())
a = False
b = False
c = False


if l[0] == 'R':
	a = True
if l[1] == 'R':
	b = True
if l[2] == 'R':
  	c = True
    
if a and b and c:
  	print(3)
elif (a and b) or (b and c):
  	print(2)
elif a or b or c:
  	print(1)
else:
  	print(0)

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

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

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

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

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

Solution (Python):
S = input()

if 'S' not in S:
    print("3")

elif 'R' not in S:
    print("0")

elif S == 'RSR':
    print("1")

elif S == 'RRS' or S == 'SRR':
    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=input()
ans = 0
if("RRR" == S) :
    ans = 3
elif("RR" in S) :
    ans = 2
elif("R" in S) :
    ans = 1
else :
    ans = 0
print(ans)

Solution (Python):
l=input()
for i in range(4):
  if "R"*i in l:
    ans=i
print(ans)

Solution (Python):
s = input()
if s == "RRR":
    print(3)
elif s[0] == "R" and s[1] != "R":
    print(1)
elif s[2] == "R" and s[1] != "R":
    print(1)
elif s[1] == "R" and s[0] != "R" and s[2] != "R":
    print(1)
elif s[0] == "R" and s[1] == "R":
    print(2)
elif s[1] == "R" and s[2] == "R":
    print(2)
else:
    print(0)

Solution (Python):
S = input()

if 'RSR' in S:
	print(1)
else:
	print(S.count("R"))

Solution (Python):
s = input()

if s.count('R') == 2:
    print(s.count('RR')+1)
else:
    print(s.count('R'))

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

print(max([len(i) for i in S]))

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

Solution (Python):
n=input()
count=0
maxi=0
flag=0
for i in range(len(n)):
	if n[i]=='R':
		count+=1
		flag=1
	else:
		maxi=max(count,maxi)
		flag=0
		count=0

if flag==0:
	print(maxi)
else:
	print(max(count,maxi))

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

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

Solution (Python):


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

print(res)

Solution (Python):
def solve():
    S = input()
    ans = cur = 0
    for c in S:
        if c == 'R':
            cur += 1
        else:
            ans = max(cur, ans)
            cur = 0
    else:
        ans = max(cur, ans)
    print(ans)

if __name__ == "__main__":
    solve()

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

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

Solution (Python):
W = input()

def solve():
  if "RRR" in W:
    return 3
  elif "RR" in W:
    return 2
  elif "R" in W:
    return 1
  else:
    return 0
print(solve())

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=="SSS":
    print(0)

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

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

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

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

Solution (Python):
s = input().strip()
g = 0
ans = 0
if s[0] == 'R': g+=1
else: g = 0
ans = max(ans, g)
if s[1] == 'R': g+=1
else: g = 0
ans = max(ans, g)
if s[2] == 'R': g+=1  
else: g = 0
ans = max(ans, g)
print(ans)

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

Solution (Python):
s = input()
ans = 0
for i in range(1, 4):
  if 'R'*i in s:
    ans = len('R'*i)
print(ans)

Solution (Python):
a=0
S=input()
if('R' in S):
    a=1
for i in range(2):
    if(S[i]==S[i+1] and S[i]=='R'):
        a=a+1
print(a)

Solution (Python):
s = input()
record = list(s)
n = 0
high_score = 0
yesterday = ' '
for today in record :
    if today == 'R':
        if yesterday == 'R' :
            n += 1
        else :
            n = 1
    if high_score < n :
        high_score = n
    yesterday = today
print(high_score)

Solution (Python):
s = input()
record = list(s)
n = 0
high_score = 0
yesterday = ' '
for today in record :
    
    if today == 'R':
        if yesterday == 'R' :
            n += 1
        else :
            n = 1
    
    if high_score < n :
        high_score = n
    yesterday = today
print(high_score)

Solution (Python):
s = list(input())
cnt = 0
sv = 0
old = "*"
for i in s:
  if i == "R":
    if old == "R":
        cnt += 1
    else:
      cnt = 1
    if cnt > sv:
      sv = cnt
  old = i
print(sv)

Solution (Python):
s=input()
c,ans=0,0
for i in range(len(s)):
    if s[i]=="S":
        c=0
    else:
        c+=1
        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())
cnt = 0
old = "*"
for i in range(len(s)):
  if s[i] == "R":
    if old == "R":
      cnt += 1
    else:
      cnt = 1
  old = s[i]
print(cnt)

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

cnt = 0
for i, s in enumerate(S):
  if s == 'R' and cnt == 0:
    cnt +=  1
  elif s == 'R' and cnt >= 1 and S[i-1] == 'R':
    cnt += 1

print(cnt)

Solution (Python):
ans = 0
s = input()
if 'RRR' == s:
  ans = 3
elif 'RR' in s:
  ans = 2
elif 'R' in s:
  ans = 1
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 = str(input())
rain = "R"

def count_rain(S,Rain):
  if Rain in S:
    Rain += "R"
    count_rain(S,Rain)
  else:
    print(len(Rain)-1)
    
count_rain(S,rain)

Solution (Python):
s=input()

ans=0
num=0
for i in range(len(s)):

    if s[i] == 'R':

        num+=1

    else:
        num=0

    if num>ans:
        ans=num

print(ans)

Solution (Python):


S = str(input())

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

Solution (Python):
i = input()
m = 0
if("R" in i):m+=1
if("RR"in i):m+=1
if("RRR" in i):m+=1
print(m)

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()
x = s.count('R')

if x == 3:
    ans = 3
elif x == 2:
    if s[1] == 'S':
        ans = 1
    else:
        ans = 2
elif x == 1:
    ans = 1
else:
    ans = 0

print(ans)

Solution (Python):
S = 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):
s=input()
count=0
sa=0
for char in s:
    if char=='R':
        sa+=1
    else:
        sa=0
    count=max(sa,count)
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=='RRR'):
  print(3)
elif(s=='RRS' or s=='SRR'):
  print(2)
else:
  s=list(s)
  if 'R' in s:
    print(1)
  else:
    print(0)

Solution (Python):
s = input()

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

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

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

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

count = 0 if s=='SSS' else 1
for i in range(1,len(s)):
    if s[i] == 'R' and s[i-1] == s[i]:
        count += 1

print(count)

Solution (Python):
arr = list(input())
z = 1
result = 1
count = 0
for i in range(len(arr) - 1):
    if arr[i] == arr[i+1] == "R":
        z += 1
        result = max(result, z)
    else:
        z = 1
if set(arr) == {'S'}:
    print(0)
else:
    print(result)

Solution (Python):
num = list(map(str,input()))
if num[0]== 'R' and num[1] =='S':
    print('1')
else:
    print(num.count('R'))

Solution (Python):
num = list(map(str,input()))
if num[0]== 'R' and num[1] =='S':
    print('1')
else:
    print(num.count('R'))

Solution (Python):
S=input()

answer = 0
count = 0
for i in S:
    if i == "R":
        count += 1
    else:
        if count > answer:
            answer = count
        count = 0
else:
    if count > answer :
        answer = count

print(answer)

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

import math

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)


INF=10**20
def solve(S: str):
    if S == "RRR":  
        print(3)
    elif S[1:3] == "RR" or S[0:2] == "RR":
        print(2)
    else:
        ans = 0
        for s in S:
            if s == "R":
                ans = 1
        print(ans)
 
    return

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



if __name__ == "__main__":
    main()

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