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

Solution (Python):
S = input()

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

print(c_max)

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  

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

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

Solution (Python):
s = input()

sn = s.strip('S')

if 'S' in sn:
  print(1)
else:
  print(len(sn))

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 == "RRS" or s == "SRR":
    print(2)
else:
    print(3)

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

"""
@author: H_Hoshigi
"""
def main():
    S = input()

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

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):








    






mod = int(1e9+7)

INF = 1<<50

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

def main():
    s = input()
    res = 0
    ans = 0
    for i in range(3):
        if s[i]=='S':
            res = max(res,ans)
            ans = 0
        else:
            ans += 1
    print(max(ans,res))
    return

if __name__=='__main__':
    main()

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

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

r = s.count('R')

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

Solution (Python):
x = input()

if x[0]=='R' and x[1]=='R' and x[2]=='R':
    ans=3
if x[0]=='R' and x[1]=='R' and x[2]=='S':
    ans=2
if x[0]=='R' and x[1]=='S' and x[2]=='R':
    ans=1
if x[0]=='R' and x[1]=='S' and x[2]=='S':
    ans=1
if x[0]=='S' and x[1]=='R' and x[2]=='R':
    ans=2
if x[0]=='S' and x[1]=='R' and x[2]=='S':
    ans=1
if x[0]=='S' and x[1]=='S' and x[2]=='R':
    ans=1
if x[0]=='S' and x[1]=='S' and x[2]=='S':
    ans=0

print(ans)

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

s=SI()
if s[0]==s[1]==s[2]=="S":
    print(0)
    sys.exit()
count=0
if s[0]==s[1]=="R":
    count+=1
if s[1]==s[2]=="R":
    count+=1
print(count+1)

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

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

Solution (Python):
s=input()
if s[0]==s[1]==s[2]=="R":
    print("3")
    exit()
elif s[0]==s[1]=="R" or s[1]==s[2]=="R":
    print("2")
    exit()

if "R" in s:
    print("1")
    exit()
print("0")

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

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

Solution (Python):
S = input()

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

Solution (Python):


def main():
    s = input()
    ans = 0
    tmp = 0
    for i in s:
        if i == "R":
            tmp += 1
        else:
            if tmp >= ans:
                ans = tmp
            tmp = 0
    print(max(ans, tmp))

main()

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):
n=str(input())
rain_max=0
rain=0
for i in n:
  if i=='R':
    rain+=1
    if rain>rain_max:
      rain_max=rain
  else:
    rain=0
print(rain_max)

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

Solution (Python):


r = input()

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

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

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

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

Solution (Python):

def main():
    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)


if __name__ == '__main__':
    main()

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

Solution (Python):
S = input()
if 'S' not in S:
    print(3)
    exit()
if 'R' not in S:
    print(0)
    exit()
if S[1] == 'S':
    print(1)
    exit()
if S == 'SRS':
    print(1)
    exit()
print(2)

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

ans = 0
tmp = 0
f = True
for i in s:
    if i == "R":
        if f == True:
            tmp += 1
        else:
            tmp = 1
            f = True
    else:
        f = False
    ans = max(tmp,ans)

print(ans)

Solution (Python):
st = input()
tmp=0
rt = 0
for i in range(len(st)):
  if st[i] == "R":
    tmp+=1
    if tmp > rt:
      rt = tmp
  else:
    tmp = 0
print(rt)

Solution (Python):
s=input()
ans=0
p=0
for i in s:
    if i=="R":
        p+=1
    else:
        ans=max(ans,p)
        p=0
ans=max(ans,p)
print(ans)

Solution (Python):
hoge=input()
if(hoge=="RRR"):
  print(3)
elif(hoge=="SSS"):
  print(0)
elif(hoge=="RSS" or hoge=="SRS" or hoge=="SSR" or hoge=="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 = sorted(input().split("S"), reverse=True)
print(len(s[0]))

Solution (Python):
def main():
    from sys import setrecursionlimit, stdin, stderr
    from os import environ
    from collections import defaultdict, deque, Counter
    from math import ceil, floor
    from itertools import accumulate, combinations, combinations_with_replacement
    setrecursionlimit(10**6)
    dbg = (lambda *something: stderr.write("\033[92m{}\033[0m".format(str(something)+'\n'))) if 'TERM_PROGRAM' in environ else lambda *x: 0
    input = lambda: stdin.readline().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    P = 10**9+7
    INF = 10**18+10

    S = input()
    cont = 0
    ans = 0
    for c in S:
        if c == 'R':
            cont += 1
        else:
            ans = max(ans,cont)
            cont = 0
    print(max(ans,cont))

    
main()

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

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

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

Solution (Python):
s = input()


def solve():
    if s.__contains__('RRR'):
        return 3
    elif s.__contains__('RR'):
        return 2
    elif s.__contains__('R'):
        return 1

    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()
ans = S.count('R')
if ans == 2 and S[1] != 'R':
	ans = 1
print(ans)

Solution (Python):
l=input()
n=len(l)
i=0
ans=0
while i<n:
	j=0
	if l[i]=='R':
		c=0
		while i+j<n and l[i+j]==l[i]:
			c+=1	
			j+=1 
		ans=max(ans,c)
		i+=j
	else:
		i+=1
print(ans)

Solution (Python):








from math import *


def _in():
    arr = [int(x) for x in input().split(' ')]
    return arr[0] if len(arr) == 1 else arr


if __name__ == "__main__":
    s = input()
    if(s == "RRR"):
        print(3)
    else:
        if(s[:2] == "RR"):
            print(2)
        elif(s[1:] == "RR"):
            print(2)
        else:
            if(s.count("R") > 0):
                print(1)
            else:
                print(0)

Solution (Python):
import sys

def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

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


if __name__ == '__main__':
    main()

Solution (Python):
s = input()

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

Solution (Python):
S=input()
if S.find("RRR")!=-1:
    print("3")
    exit()
if S.find("RR")!=-1:
    print("2")
    exit()
if S.find("R")!=-1:
    print("1")
    exit()
else:
    print("0")

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

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

Solution (Python):
s = input()
c = 0
try:
    for i in range(s.index("R"), len(s)):
        if s[i] == "S":
            break
        c += 1
    print(c)
except ValueError:
    print(0)

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

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    s = gete()

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


if __name__ == "__main__":
    main()

Solution (Python):


S=input()
ans=1
if S=="SSS": ans=0
if S=="RRR": ans=3
if S=="RRS" or S=="SRR": ans=2

print(ans)

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

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):
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    S = input()

    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)






if __name__ == "__main__":
    main()

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 not("R" in list(s)):
  count=0
  print(count)
else:
  count=1
  for i in range(2):
    if s[i]=="R" and s[i+1]==s[i]:
      count+=1
  print(count)

Solution (Python):

S = str(input())






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

Solution (Python):
s = input()

if "R" not in s:
    print(0)
    exit()
ans = 1
for i in range(2):
    if s[i] == "R" and s[i+1] == "R":
        ans += 1

print(ans)

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

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):
S = input()

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

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

Solution (Python):
s = input()
max = 0
count = 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()
cnt = 0
for i in range (3):
    if s[i] == 'R':
        cnt += 1
if cnt == 3:
    print(3)
elif cnt == 2:
    if s[1] == 'S':
        print(1)
    else:
        print(2)
else:
    print(cnt)

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):
str = input()
val = str.count("R")
if str[1] != "R" and val != 0: print(1)
else: print(val)

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):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = ns()

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

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

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

Solution (Python):
s = input()

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

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

ans = 0
for x in s:
    ans = max(ans, len(x))
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=input()

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

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

Solution (Python):
import math
import fractions
import collections
import itertools
S=list(input())
cnt=0
ans=0
if S[0]=="R":
    cnt=1
for i in range(1,len(S)):
    if S[i]=="R":
        cnt=cnt+1
    else:
        ans=max(ans,cnt)
        cnt=0
ans=max(ans,cnt)
print(ans)

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

Solution (Python):
a=[0]
for i in input():
    if i=="R":a+=[a[-1]+1]
    else:a+=[0]
print(max(a))

Solution (Python):
S = input()
from collections import defaultdict
C = defaultdict(int)
for s in S:
    C[s] += 1
if C["R"] == 3:
    print(3)
elif C["S"] == 3:
    print(0)
elif C["R"] == 1:
    print(1)
else:
    if 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()
cnt = 0
max_cnt = 0

for i in range(3):
  if s[i] == "S":
    cnt = 0
  else:
    cnt += 1
    if max_cnt < cnt:
      max_cnt = cnt
    
print(max_cnt)

Solution (Python):
s=input()
ans=0
i=0
while i<3 and s[i]=='S':
    i+=1
while i<3 and s[i]=='R':
    i+=1
    ans+=1

print(ans)

Solution (Python):
S = input()
if S == 'RRR':
    print(3)
elif S == 'RRS' or S == 'SRR':
    print(2)
elif S.count('R') > 0:
    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 = input()
count = 0
for i in s:
    if i == 'R':
        count += 1
if count == 2:
    if s[1] == 'S':
        count -= 1
print(count)

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

Solution (Python):

import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (
    acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians,
    sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits


def inp():
    return(int(input()))


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


def instr():
    s = input()
    return(list(s[:len(s)]))


def invr():
    return(map(int, input().split()))


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


if __name__ == "__main__":
    main()

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

Solution (Python):
S = input()
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()
c = 0
m = 0
for s in S:
    if s == "R":
        c += 1
    else:
        m = max(c,m)
        c = 0
    m = max(c,m)

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

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

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

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

Solution (Python):


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

Solution (Python):
import math
import itertools
import sys
s = input()
cnt = 0
for i in range(3):
    if(s[i] == 'R'):
        cnt += 1
if(cnt == 1 or cnt == 3):
    print(cnt)
elif(cnt == 0):
    print(0)
else:
    if(s[1] == 'R'):
        print(2)
    else:
        print(1)

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re












import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
s = input()
i = 0
flag = False
ans = 0
for i in range(len(s)):
    if flag:
        if s[i] == 'R':
            ans += 1
        else:
            flag = False
    else:
        if s[i] == 'R':
            ans = max(ans,1)
            flag = True
        else:
            flag = False
print(ans)

Solution (Python):






S = input()





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

Solution (Python):

import sys


def solve(S: str):
    if S=="RRR":
        ans=3
    elif "RR" in S:
        ans=2
    elif "R" in S:
        ans=1
    else:
        ans=0
    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 = str(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())
count=0
for d in s:
    if d=="R":
        count += 1
if count == 2:
    if s[1]=="S":
        print(1)
    else:
        print(2)
else:
    print(count)

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

Solution (Python):
s = input()

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

print(ans)

Solution (Python):
weather = input()
suc_rain = 0
suc_rain_max = 0
for s in weather:
    if s == 'R':
        suc_rain += 1
    else:
        suc_rain = 0
    suc_rain_max = max(suc_rain_max, suc_rain)
print(suc_rain_max)

Solution (Python):
s = input()

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

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

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

s=input().strip()
ans = []
count=0
for i in range(3):
    if s[i]=='R':
        count+=1
    else:
        ans.append(count)
        count = 0
ans.append(count)
print(max(ans))

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

import sys
input=sys.stdin.readline

s=input().rstrip()
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()
ans = 0
j = 0
for i in range(3):
    if S[i] == 'R':
        j += 1
    else:
        j = 0
    ans = max(ans, j)

print(ans)

Solution (Python):
a=input()
c=0
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()
count = s.count("R")

if count == 0:
    print("0")
elif count == 1:
    print("1")
elif count == 2:
    if s == "RSR":
        print("1")
    else:
        print("2")
else:
    print("3")

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

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

Solution (Python):

from itertools import groupby
def resolve():
    S = input()
    gr = groupby(S)
    ans = 0
    for k, v in gr:
        if k == "R":
           ans = len(list(v))
    print(ans)
    
if __name__ == "__main__":
    resolve()

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10**6)
input = sys.stdin.readline

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

if __name__ == "__main__":
    main()

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

ans = 0
for i in S:
  if i == "R":
    ans += 1

if ans != 0 and S[1] != "R":
  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 = 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()

x0 = 0
x = 0

for c in S:
    if c == 'R':
        x0 += 1
        x = max(x, x0)
    else:
        x0 = 0

print(x)

Solution (Python):
import time
startTimeProblem=time.time()

import fileinput, sys, itertools, functools
from math import *
from bisect import *
from heapq import *
from collections import *

def lcm(a, b):  
    return (a*b)/gcd(a, b)

class InputHelper:
    def __init__(self):
        self.myinput = fileinput.input()

    def isLocal(self):
        return not fileinput.isstdin()

    def int(self):
        return int(self.myinput.readline().rstrip())

    def ints(self):
        return [int(_) for _ in self.myinput.readline().rstrip().split()]

    def str(self):
        return self.myinput.readline().rstrip()

    def strs(self):
        return [_ for _ in self.myinput.readline().rstrip().split()]

class OutputHelper:
    def int(self, a):
        print(a)    

    def ints(self, a):  
        print(" ".join([str(_) for _ in a]))
    
    def intsNL(self, a):
        for _ in a:
            print(_)
    
    def str(self, s):
        print(s)

    def strs(self, s):
        print(" ".join([_ for _ in s]))

    def strsNL(self, s):
        for st in s:
            print(st)

class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None
        self.prev = None

In = InputHelper()
Out = OutputHelper()



S = In.str()

if S[0] == "R" and S[1] == "R" and S[2] == "R":
    Out.int(3)
elif S[0] == "R" and S[1] == "R":
    Out.int(2)
elif S[2] == "R" and S[1] == "R":
    Out.int(2)
elif "R" in S:
    Out.int(1)
else:
    Out.int(0)



if len(sys.argv)>2 and sys.argv[2]=="TIMEIT":
    fin = (time.time()-startTimeProblem)*1000
    print("{:.2f}".format(fin) + "ms")