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

def Convert(string): 
    li = list(string.strip()) 
    return li 

s=str(input())

l=[]
l=Convert(s)

x=len(l)
count=0
if(l[0]=='R'):
	count=1
	if(l[1]=='R'):
		count=count+1
		if(l[2]=='R'):
			count=count+1		
	
else:
	if(l[1]=='R'):
		count=count+1
		if(l[2]=='R'):
			count=count+1
	else:
		if(l[2]=='R'):
			count=count+1

print(count)

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

Solution (Python):
S = input()

ren = 0

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

Solution (Python):
S = input()

if "RRR" in S:
    ans = 3

elif "RR" in S:
    ans = 2
    
elif "R" in S:
    ans = 1
else:
    ans = 0
    
print(ans)

Solution (Python):
dict = {
    "SSS":0,"SSR":1,"SRR":2,"RRR":3,"RSR":1,"SRS":1,"RSS":1,"RRS":2
}
print(dict[input()])

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

Solution (Python):
num = input()
count = 0
renzoku = 0

if num[0] == "R":
    count += 1
    renzoku += 1

if num[1] == "R":
    count += 1
    renzoku += 1
else:
    renzoku = 0

if num[2] == "R":
    count += 1
    renzoku += 1

if count == 1:
    print(count)
else:
    print(renzoku)

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

Solution (Python):
N=input()
if N==('SSS'):
    print(0)

if N==('SSR'):
    print(1)

if N==('SRS'):
    print(1)

if N==('RSR'):
    print(1)

if N==('RSS'):
    print(1)

if N==('SRR'):
    print(2)

if N==('RRS'):
    print(2)

if N==('RRR'):
    print(3)

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

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

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

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

print(count)

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

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

compareStr = 'R' * len(S)

while len(compareStr) > 0:
    if compareStr in S:
        break
    compareStr = compareStr[:-1]

print(len(compareStr))

Solution (Python):
def resolve():
    weather = input()
    if weather[0] == 'R':
        if weather[1] == 'R':
            if weather[2] == 'R':
                print(3)
            else:
                print(2)
        else:
            print(1)
    else:
        if weather[1] == 'R':
            if weather[2] == 'R':
                print(2)
            else:
                print(1)
        else:
            if weather[2] == 'R':
                print(1)
            else:
                print(0)
resolve()

Solution (Python):


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

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

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

count = 0
maxCount = 0
for c in S:
  if c == 'R':
    count += 1
    if maxCount < count:
      maxCount = count
  else:
    count = 0

print(maxCount)

Solution (Python):
s = input()
length = len(s)

before = s[0]
chain = -1
cnt = 0
ans = 0

for a in range(length):
    if s[a] == 'R':
        if chain:
            cnt += 1
        else:
            chain = 1
            cnt += 1
    else:
        chain = -1
        cnt = 0

    ans = max(ans, cnt)

print(ans)

Solution (Python):
s=input()
if 'R' not in s:
    print(0)
elif s.count('R')==2:
    if s=="RSR":
        print(1)
    else:
        print(2)
else:
    print(s.count('R'))

Solution (Python):
import re
S = input()

if S == 'RRR':
    print(3)
elif re.search('RR', S) is not None:
    print(2)
elif re.search('R', S) is not None:
    print(1)
else:
    print(0)

Solution (Python):
S = input()

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

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

Solution (Python):
N = input()

if "RRR" in N:
    print("3")
    exit()

elif "RR" in N:
    print("2")
    exit()

elif "R" in N:
    print("1")
    exit()

else :
    print("0")
    exit()

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


first = None
for i in range(len(_s)):
	if(_s[i] == 'R'):
		if first is not None:
			if(_s[i] == _s[i-1]):
				cnt += 1
		if first is None:
			cnt += 1
			first = True
print(cnt)

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

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

print(c)

Solution (Python):
S = input()

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

print(ans)

Solution (Python):
S = input()

c = 0
for i in range(3):
  if S[i] == 'R':
    c += 1
    
if c == 2 and S[1] == 'S':
  c = 1
  
print(c)

Solution (Python):
s = 'S'
r = 'R'

x = input()
unko = list(x)
count = 0
for i in unko:
    if i == 'R':
        count = count + 1
if x == 'RSR':
    count = 1
print(count)

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

for i in range(len(s)):
    if s[i] == 'R':
        count += 1
ans = count

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

print(ans)

Solution (Python):
weatherList = list(input())
totalcount = 0

if weatherList[0] == "R":
  totalcount += 1
  if weatherList[1] == "R":
    totalcount += 1
    if weatherList[2] == "R":
      totalcount += 1
      
elif weatherList[1] == "R":
  totalcount += 1
  if weatherList[2] == "R":
    totalcount += 1
    
elif weatherList[2] == "R":
  totalcount += 1

print(totalcount)

Solution (Python):
def main():
    S = input()
    answer = solve(S)
    print(answer)


def solve(S):
    patterns = {
        'SSS': 0,
        'SSR': 1,
        'SRS': 1,
        'SRR': 2,
        'RRR': 3,
        'RRS': 2,
        'RSR': 1,
        'RSS': 1
    }

    return patterns[S]


if __name__ == "__main__":
    main()

Solution (Python):
s = input()
ans = 0
k = 0
for i in s:
    if i == 'R': k += 1
    else:
        if k > ans: ans = k
        k = 0
if s.endswith('R') and k > ans: ans = k
print(ans)

Solution (Python):
S = input()
count = 0
if S[0] == 'R':
    count += 1
for i in range(1, len(S)):
    if S[i] == 'R':
        if i == 2 and count == 0:
            count += 1
        if S[i-1] == 'R':
            count += 1
if S == "SRS":
    count = 1
print(count)

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

Solution (Python):
S = str(input())
A= S[0]
B=S[1]
C=S[2]
L=list([A,B,C])
Rcount = S.count('R')
if Rcount ==0:
    print(0)
elif Rcount ==1:
    print(1)
elif Rcount == 3:
    print(3)
else:
    if B == 'R':
        print(2)
    else:
        print(1)

Solution (Python):
S = list(input())
flag = False
count = 0
max_ = 0
for i in range(3):
    if flag == True:
        if S[i] == "R":
            count += 1
        else:
            flag = False
            count = 0
    else:
        if S[i] == "R":
            count += 1
            flag = True
    if count > max_:
        max_ = count
print(max_)

Solution (Python):

str_input = input()

counter = 0

counter = str_input.count("R")

if counter == 3 and str_input[1] in "R":
    pass
elif counter == 2 and str_input[1] in "R":
    pass
elif counter == 2 and str_input[1] in "S":
    counter -= 1
print(counter)

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

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

Solution (Python):
s = list(input())
opt = 0
if (s[0] == 'S'):
    if (s[1] == 'R'):
        opt += 1
    if (s[2] == 'R'):
        opt += 1
    print(opt)
    exit()
if (s[0] == 'R'):
    opt += 1
if (s[1] == 'R'):
    if (s[1] == 'R'):
        opt += 1
    if (s[2] == 'R'):
        opt += 1

print(opt)

Solution (Python):


import sys
import argparse
import logging


logging.basicConfig(filename='logger.log', level=logging.DEBUG)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)


def f(s: str) -> int:
    '''
    >>> f("SSS")
    0
    >>> f("RRS")
    2
    >>> f("RRR")
    3
    >>> f("RSR")
    1
    '''
    result = 0
    n = 0
    for c in list(s):
        if c == 'R':
            n += 1
        else:
            n = 0
        result = max(result, n)
    return result


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument(
            '--doctest', action='store_true', default=False)
    args = parser.parse_args()
    if args.doctest:
        import doctest
        doctest.testmod(verbose=True)
        sys.exit()

    s = sys.stdin.readline().rstrip()
    print(f(s))

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

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

Solution (Python):
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))


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

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

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

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

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

Solution (Python):
a = input()
emp = 0
l = a.split('S')
while("" in l):
   l.remove("")
if not l:
   print(emp)
else:
   print(len(l[0]))

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


if (S[0] == 'R') and (S[0] == S[1] and S[1] == S[2]):
    i = 3

elif (S[1] == 'R') and (S[0] == S[1] or S[1] == S[2]):
    i = 2

elif (S[0] == S[1] and S[2] == 'S'):
    i = 0

else:
    i = 1

print(i)

Solution (Python):
from itertools import groupby
maxs = 0
given = groupby(input())
for i, v in given:
    if i == "R":
        maxs = max(maxs, len(list(v)))
print(maxs)

Solution (Python):

s = input()
c = s.count("R")

if c == 1:
    print(c)
elif c == 2:
    if s[0] == s[1]:
        print(c)
    elif s[1] == s[2]:
        print(c)
    else:
        print(1)
elif c == 3:
    print(3)
elif c == 0:
    print(0)

Solution (Python):
s = input()

table = {'RRR':3,'RRS':2,'RSR':1,'RSS':1,'SRS':1,'SRR':2,'SSS':0,'SSR':1}

for key,value in table.items():
    if key==s:
        print(value)

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

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

Solution (Python):
s = input().strip()

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")or(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):
def resolve():
	S = input()
	mark = ""
	count = 0
	max_count = 0
	for s in list(S):
		if s == "R":
			count += 1
		else:
			max_count = max(max_count, count)
			count = 0
			mark = s
	max_count = max(max_count, count)
	print(max_count)
resolve()

Solution (Python):
S = input()
p = 0
q = 0
for i in range(len(S)):
    if S[i] != 'S':
        p += 1
        if p > q:
            q = p
    else:
      	p = 0
print(q)

Solution (Python):
x, y, z = input()
a = 0
if x == 'R':
  a += 1
  if y == 'R':
    a += 1
    if z == 'R':
      a += 1
else:
  if y == 'R':
    a += 1
    if z == 'R':
      a += 1
  else:
    if z == 'R':
      a += 1
print(a)

Solution (Python):
a = input()
emp = 0
l = a.split('S')
while("" in l):
   l.remove("")
if not l:
   print(emp)
else:
   print(len(l[0]))

Solution (Python):
import re

X = input()

if re.search("RRR", X) != None:
  print("3")
elif re.search("RR", X) != None:
  print("2")
elif re.search("R", X) != None:
  print("1")
else:
  print("0")

Solution (Python):


import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

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

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

S = str(input())

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

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

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

Solution (Python):
def Qa():
    s = input()
    ans = 0
    for v in s:
        if v == 'R':
            ans += 1
        elif ans == 0 and v == 'S':
            continue
        else:
            break
    print(ans)


if __name__ == '__main__':
    Qa()

Solution (Python):
def rain(S):
	i = 0
	while(i<3 and S[i]!='R'):
	  i+=1

	if(i==3):
		return 0

	j = i+1
	while(j<3 and S[j]=='R'):
	  j+=1

	return j-i

S = input()
print(rain(S))

Solution (Python):

S = input()

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

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

print(fin)

Solution (Python):

 
def main():
    string = input()
    count = 0
    maxv = -1
    for s in string:
        if s == "R":
            count = count + 1
        else:
            maxv = max(count, maxv)
            count = 0
    maxv = max(count, maxv)
    print(maxv)
 
main()

Solution (Python):
a,b,c = map(str,input().rstrip(""))


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

print(count)

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

Solution (Python):
weather = input()
rainyDay = weather.count('R')
if rainyDay < 2:
    print(rainyDay)
else:
    if weather[1] == 'R':
        print(rainyDay)
    else:
        print(1)

Solution (Python):
s=input()

m=0
for i in range(3):
  if s[i]=="S":
    continue
  j=i
  while j<3 and s[j]=="R":
    j+=1
  m=max(m,j-i)
print(m)

Solution (Python):
S = input()

if S == "RRR":
    print(3);
elif S[1:3]=="RR" or S[0:2]=="RR":
    print(2);
elif S[0]=="R" or S[1]=="R":
    print(1);
elif S[2]=="R":
    print(1);
else:
    print(0);

Solution (Python):
S = input()

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

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

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

Solution (Python):
a = input()
emp = 0
l = a.split('S')
while("" in l):
   l.remove("")
if not l:
   print(emp)
else:
   print(len(l[0]))

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

Solution (Python):
L=input()
x=int(0)
if (L in 'RRR'):
 x+=3
if (L in 'RRS'):
 x+=2
if (L in 'SRR'):
 x+=2
if (L in 'RSS'):
 x+=1
if (L in 'SRS'):
 x+=1
if (L in 'SSR'):
 x+=1
if (L in 'RSR'):
 x+=1
print(x)

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

Solution (Python):
s = input().strip()
best = 0
streak = 0
for c in s:
    if c == 'R':
        streak += 1
        best =  max(best, streak)
    else:
        streak = 0
print(best)

Solution (Python):
def abc175a_rainy_season():
    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)


abc175a_rainy_season()

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

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

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

Solution (Python):
S = input()
ans = 0
for i in range(len(S)):
    if S[i]=='R':
        ans+=1
if ans==2:
    if S[0]!=S[1] and S[1]!=S[2]:
        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()
c=0
ans=0
for i in range(len(s)):
  	if(s[i]=='R'):
  		c+=1
  	else:
  		ans=max(ans,c)
  		c=0
if(c):    
  	ans=max(ans,c)
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()
R = S.count('R')
print("1" if R == 2 and S[1] == "S" else R)

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 == 'RSR':
    print(1)
else:
    print(S.count('R'))

Solution (Python):
def RainySeason():
    
    str1 = str(input())

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

if __name__ == '__main__':
    RainySeason()

Solution (Python):
import sys
import math
from collections import defaultdict, deque
from copy import deepcopy
    
input = sys.stdin.readline
def RD(): return input().rstrip()
def F(): return float(input().rstrip())
def I(): return int(input().rstrip())
def MI(): return map(int, input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float,input().split()))
def Init(H, W, num): return [[num for i in range(W)] for j in range(H)]
def end_of_loop():raise StopIteration
    
    
def main():
    temp = input().rstrip()
    result = 0
    result2 = 0
    for i in range(3):
        if temp[i] == "R":
            result+=1
        else:
            result2 = max(result2, result)
            result=0
    result2 = max(result2, result)
    print(result2)
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)

Solution (Python):
def INT():
    return int(input())

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

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

S = input()
ans = int(S[0] == "R" and S[1] == "R") + int(S[2] == "R" and S[1] == "R") + 1
print(ans if "R" in S else 0)

Solution (Python):
a = input()
continuous = 0


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

Solution (Python):
s = input()

ans = 1
check = False

if "R" in s:
    check = True

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

if check:
    print(ans)
else:
    print(0)

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

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

Solution (Python):
s=input()
k=s.count('R')
ctr=0
for i in range(2):
  if s[i]==s[i+1]:
    ctr+=1
if k==ctr+1:
  print(k)
elif k!=0:
  print(1)
elif k==0:
  print(0)

Solution (Python):
s = input()
def solve(s):
    c = s.count('R')
    if c in [0, 1, 3]:
        return c
    elif s.count('RR') == 1:
        return 2
    else:
        return 1
print(solve(s))

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

count=0
maxcount=0
flg=True
for i in range(3):
  
  
  
  if S[i:i+1]=='R':
    if i>0 and S[i-1:i]=='R':
      count+=1
    else:
      count=1
print(str(count))

Solution (Python):
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from heapq import heappush,heappop
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input().rstrip()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007

inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file = 1





    
def solve():


    
    

        
    ans = 0
    s = si()
    c = 0
    for i in s:
        if i=='S':
            ans = max(ans,c)
            c = 0
        else:
            c+=1
    ans = max(ans,c)
    print(ans)











        
if __name__ =="__main__":

    if(file):

        if path.exists('input.txt'):
            sys.stdin=open('input.txt', 'r')
            sys.stdout=open('output.txt','w')
        else:
            input=sys.stdin.readline
    solve()

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

Solution (Python):
weather = input()

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

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


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

Solution (Python):


S = input()
count = 0
max_days = 0

for x in S:
    if x == 'S':
        count = 0

    if x == 'R':
        count += 1
        if count > max_days:
            max_days = count

print(max_days)

Solution (Python):
S = input()

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

Solution (Python):
data = input()
weathers = {"RRR":3, "RRS":2,"RSR":1,"RSS":1,"SRR":2,"SRS":1,"SSR":1,"SSS":0}

print(weathers[data])

Solution (Python):
n=input()

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

Solution (Python):
S = input()

max_cnt = 0
cnt = 0
for s in S:
    if s == "R":
        cnt += 1
        if cnt > max_cnt:
            max_cnt = cnt
    else:
        cnt = 0
print(max_cnt)

Solution (Python):


S = input()
N = len(S)
ans = 0
cnt = 0
for i in range(N):
    if S[i] == "R":
        cnt += 1
        ans = max(ans,cnt)
    else:
        ans = max(ans,cnt)
        cnt = 0
print(ans)

Solution (Python):
import re

pattern = re.compile("R+")
try:
    print(len(re.search(pattern, input()).group(0)))
except AttributeError:
    print(0)

Solution (Python):
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


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


if __name__ == '__main__':
    main()

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

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

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

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 "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s = input()

sc = s.count('S')


if sc == 0:
    print(3)
if sc == 2:
    print(1)
if sc == 3:
    print(0)

if sc == 1:
    if s[1] == 'S':
        print(1)
    else:
        print(2)

Solution (Python):
n = input()

num = n.count("R")

if num == 2 and n[0] != n[2]:
  print(num)
elif num == 2 and n[0] == n[2]:
  print(1)
else:
  print(num)

Solution (Python):
S=input()
s=S.split('S')
ans=0
for i in s:
    ans=max(ans,len(i))
print(ans)

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

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

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

Solution (Python):

def main():
    s = list(input())
    cnt = 0

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


if __name__ ==  "__main__":
    main()

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

Solution (Python):
s=input()

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