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

if S.count("RRR") == 1:
  print(3)
elif S.count("RR") == 1:
  print(2)
elif S.count("R") != 0:
  print(1)
else:
  print(0)

Solution (Python):
print(max(map(lambda x: len(x), input().split('S'))))

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

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

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

Solution (Python):
S=input()

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

Solution (Python):
t = input()
if (abs(len(t))<=3) and (t in 'S' or 'R'):
    if t[0]=='R' and t[1]=='R' and t[2]=='R':
        print(3)
    elif (t[0]=='R' and t[1]=='R' and t[2]!='R') or (t[0]!='R' and t[1]=='R' and t[2]=='R'):
        print(2)
    elif t[0]!='R' and t[1]!='R' and t[2]!='R':
        print(0)
    else:
        print(1)
else:
    print('false')

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

    counter: int = 0
    res: int = 0

    for w in s:
        if w == 'R':
            counter += 1
            if counter > res:
                res = counter
        else:
            counter = 0

    print(res)

if __name__ == '__main__':
    main()

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)
elif S=='SSS':
    print(0)
else:
    print(1)

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

cnt = 0

for i in range(len(S)):
  if S[i] == 'R':
    if cnt == 0:
      cnt += 1
    elif S[i - 1] == 'R':
      cnt += 1

print(cnt)

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

Solution (Python):
s = list(input())
result = 0
answer = 0

for i in range(len(s)):
	if s[i] == "R":
		result += 1
	else:
		result = 0
	if result > answer:
		answer = result

print(answer)

Solution (Python):
def main():
  s = list(input())
  ans = 0
  ansma = 0
  for i in s:
    if i == "R":
      ans += 1
    else:
      ans = 0
    if ans >= ansma:
      ansma = ans
  print(ansma)
  
if __name__ == "__main__":
  main()

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

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


cnt=0
maxcnt=0
for A in p_str:
  if A=='R':
    cnt+=1
  else:
    cnt=0
  if maxcnt < cnt:
    maxcnt=cnt
    
print(maxcnt)

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

ans = 0
counter = 0
for s in S:
    if s == 'S':
        ans = max([ans, counter])
        counter = 0
    else:
        counter += 1
else:
    ans = max([ans, counter])
print(ans)

Solution (Python):
S = input()

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

Solution (Python):
S = input()

n_rainy_day = 0

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

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

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):
data=input()
ans=0
temp=0
for i in range(len(data)):
    if data[i]=="S":
        temp=0
    else:
        temp+=1
    if ans<=temp:
        ans=temp
print(ans)

Solution (Python):
import math

n=0
result=0
k=input()

for i in range(len(k)):
    if k[i]=="R":
        n+=1
    else:
        result=max(result,n)
        n=0
result=max(result,n)
print(result)

Solution (Python):
s = str(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):
S = input()

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)

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

C = 0
c = 0
for d in D :
  if d == 'R':
    c += 1
    if c > C :
      C = c
  else : 
    c = 0
    
print(C)

Solution (Python):
S = list(input())
T = []
cnt = 0
for i in range(len(S)):
  if S[i]=='R':
    T.append(1)
  else:
    T.append(0)
result = int("".join(str(i) for i in T),2)
if(result==0):
  cnt=0
elif ((result==6) or (result==3)):
  cnt = 2
elif (result==7):
  cnt = 3
else:
  cnt = 1
print(cnt)

Solution (Python):
S = input()
ans = 0
if S[0]=="R":
    ans += 1
if S[1]=="R":
    ans += 1

if S[2]=="R":
    if S[1]=="R":
        ans += 1
    elif S[0]=="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 = list(input())
ans = 0
i = 0

if(S[i] == 'R'):
    ans+=1
    i+=1
    if(S[i]=='R'):
        ans+=1
        i+=1
        if(S[i]=='R'):
            ans+=1
elif(S[i+1]=='R'):
    ans+=1
    i+=1
    if(S[i+1]=='R'):
        ans+=1
elif(S[i+2]=='R'):
    ans+=1
        
print(ans)

Solution (Python):
s=input()

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

Solution (Python):
s=input()
l=list(s)
m=l.count("R")
if m==0:
  print(0)
elif m==1:
  print(1)
elif m==3:
  print(3)
else:
  if l[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):
we=input()
if we=="RRR":
  print(3)
elif we=="RRS" or we=="SRR":
  print(2)
elif we=="SSS":
  print(0)
else:
  print(1)

Solution (Python):
day = input()
resMax = 0
resTemp = 0
for i in range(len(day)):
  if day[i]=='S':
    resTemp=0
  elif day[i]=='R':
    resTemp=0
    while (i<len(day)) and (day[i]!='S'):
      resTemp+=1
      i+=1
    if resTemp>resMax:
      resMax=resTemp
print(resMax)

Solution (Python):
S = input()

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

Solution (Python):
n = input().rstrip()
count = 0
max = 0
for i in range(len(n)):
    if n[i] == "R":
        count += 1
        if max < count:
            max = count
    else:
        count = 0

print(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):
import sys
input = sys.stdin.readline


def solve():
    if "RRR" in weather:
        return 3
    elif "RR" in weather:
        return 2
    elif "R" in weather:
        return 1
    else:
        return 0
if __name__ == "__main__":
    weather = input().rstrip()
    print(solve())

Solution (Python):
S = input()

row_now = 0
row_max = 0
for day in S:
    if day == "R":
        row_now += 1
    else:
        row_now = 0
    if row_now > row_max:
        row_max = row_now

print(row_max)

Solution (Python):
a = input()

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

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

def input(): return sys.stdin.readline().rstrip("\r\n")
def List(): return list(map(int, input().split()))
def Num(): return int(input())


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

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

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

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

Solution (Python):
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):
r,s=0,input()
for l in s:
  if l=='S' and r>0:
    break
  r+=1 if l=='R' else 0
print(r)

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

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

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

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

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

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

Solution (Python):
lst = list(input().upper())
max_count = 0
if "R" in lst:
    slicedList = lst[lst.index("R")+1:]
    
    counter = 0
    for i in lst:
        if i == "R":
            counter += 1
            if counter > max_count:
                max_count = counter
        else:
            counter = 0
                
print(max_count)

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

Solution (Python):
t = list(input())
if t[1] == 'S':
  if t.count('R')>0:
  	print(1)
  else:
    print(0)
else:
  print(t.count('R'))

Solution (Python):
S = input()
max_count = 0
counter = 0
for i in S:
  if i == 'S':
    if max_count < counter:
      max_count = counter
      counter = 0
  elif i == 'R':
    counter += 1

if max_count < counter:
  max_count = counter

print(max_count)

Solution (Python):



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



def main():
    s = input()

    
    
    
    
    first = s[0] == 'R'
    second = s[1] == 'R'
    third = s[2] == 'R'

    if first and second and third:
        print(3)
    elif (first and second) or (second and third):
        print(2)
    elif (first or second or third):
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):



def main():
    s = input()

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


if __name__ == '__main__':
    main()

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

Solution (Python):
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):
def main():
    import sys
    input = sys.stdin.readline
    S = input().strip()
    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.find('RRR')>=0:
    print(3)
elif s.find('RR')>=0:
    print(2)
elif s.find('R')>=0:
    print(1)
else:
    print(0)

Solution (Python):
W = input()
len = W.count('R')

if len != 2:
    print(len)
elif W[1] == 'R':
    print(2)
else:
    print(1)

Solution (Python):
s = input()

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

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

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

if __name__ == "__main__":
    print(rain(S))

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

cnt = 0
ans = 0

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

print(ans)

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def input():
    return sys.stdin.readline().strip()


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

def main():
    INF = 999999999999999999999999
    MOD = 10**9+7

    s = input()

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

main()

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

Solution (Python):
S = input()

count = 0
rain_counter = 0
L = []
for s in S:
    if s == "R":
        rain_counter += 1
    if s == "S":
        L.append(rain_counter)
        rain_counter = 0
    count += 1
    if count == len(S):
        L.append(rain_counter)

print(max(L))

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

Solution (Python):
s=input()
t=s.find('R')
if t==2:
    print(1)
elif t==-1:
    print('0')
elif t==0:
    if s[t]==s[t+1]:
        if s[t+1]==s[t+2]:
            print('3')
        else:
            print('2')
    else:
        print(1)
else:
    if s[t]==s[t+1]:
        print(2)
    else:
        print(1)

Solution (Python):
s = input()

if s == 'RSR':
    print(1)
    exit()

ans = 0

for i in s:
    if i == '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):
s=input()
count=0
i=0
while i<len(s):
    summ=0
    while i<len(s) and s[i]=='R':
        summ+=1
        i+=1
    if summ>count:
        count=summ
    i+=1


print(count)

Solution (Python):
x = input()

ans = 0
if x == 'SSS':
    print(0)

elif x == 'RRR':
    print(3)
    
elif x=='RRS' or x=='SRR':
    print(2)
    
else:
    print(1)

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

if s[0] == 'R':
    if s[1] == 'R':
        if s[2] == 'R':
            ans = 3
        else:
            ans = 2
    else:
        ans = 1

elif s[1] == 'R':
    if s[2] == 'R':
        ans = 2
    else:
        ans =1

elif s[2] == '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):

    


import collections
if __name__=='__main__':
    s  = input()
    maxs = 0
    r = 0
    for i in s:
        if i == 'R':
            r+=1
        else:
            r = 0
        maxs = max(maxs,r)
    print(maxs)

Solution (Python):
S = input()

cur_l, max_l = 0, 0

for s in S:
  if s == 'R':
    cur_l += 1
  else: 
    if cur_l > max_l:
      max_l = cur_l
    cur_l = 0

if cur_l > max_l:
  max_l = cur_l

print(max_l)

Solution (Python):
import sys
from collections import Counter


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


s = S()

if s == 'RRR':
    ans = 3
elif s[:2] == 'RR' or s[1:] == 'RR':
    ans = 2
else:
    c = Counter(list(s))
    if c['R'] == 1:
        ans = 1
    elif c['S'] == 3:
        ans = 0
    else:
        ans = 1

print(ans)

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

c = 0
d = 0

for i in range(len(S)):
  if S[i] == 'R':
    d += 1
    if c <= d:
      c = d
  else:
    d = 0

print(c)

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

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

if "RRR" in tenki:
  print(3)

elif "RR" in tenki and "RRR" not in tenki:
  print(2)
elif "RR" not in tenki and "SSS" not in tenki:
  print(1)
else:
  print(0)

Solution (Python):
S=input()
p=S[0]
q=S[1]
r=S[2]

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

Solution (Python):




def main():
    S = input().split('S')

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


if __name__ == "__main__":
    main()

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 math

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

Solution (Python):
S = input()
s_num = len(S)

i=0
max_count = 0
count = 0

while i < s_num:
    if S[i] != "R":
        if max_count < count:
            max_count = count
            count = 0
    elif S[i] == "R":
        count += 1

    i+=1

if max_count < count:
    max_count = count

print(max_count)

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

Solution (Python):

import sys
from itertools import chain




def solve(S: str):
    answer = max(list(map(len, S.split("S"))))
    return answer


def main():
    S = input()  
    print(solve(S))


if __name__ == "__main__":
    main()

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

Solution (Python):
S = input()

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

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

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

print(a)

Solution (Python):

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

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

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

Solution (Python):
S = list(input())
max = 0
j = 0
for i in range(3):
    if S[i] == 'R':
        j += 1
        if max < j:
            max = j
    if S[i] == 'S':
        j = 0

print(max)

Solution (Python):
S = input()

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

Solution (Python):
S = input()
answers = [0]
ans = 0
i = 0
while i <= 2:
  if S[i] == 'R':
    ans += 1
  else:
    answers.append(ans)
    ans = 0
  i += 1

answers.append(ans)

print(max(answers))

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

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

Solution (Python):
str =list(input())
counter =0
max=0
for s in str:
    if s =='S':
        counter =0
    else :
       counter +=1
       if max <counter:
          max =counter
print(max)

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

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

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

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()
countr,maxcountr = 0,0
for i in range(3):	
	if(S[i] == "R"):
		countr += 1
	else:	
		countr = 0
	if(maxcountr < countr):
			maxcountr = countr
print(maxcountr)

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

cccount = 0
count = 0
for s in splited:
  if s == 'R':
    count = count + 1
    if count > cccount:
      cccount = count
  else:
      count = 0
    
print(cccount)

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

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

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

Solution (Python):
s=str(input())
li=[0]
for i in range(0,len(s)):
    if s[i]=="R":
        val=0
        for ii in range(i,len(s)):
            if s[ii]=="S":
                li.append(val)
                val=0
                break
            else:val+=1
        li.append(val)
print(max(li))

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):
tenki = str(input())
count = 0
tenki_list = []
for n in tenki:
    if n == 'R':
        count +=1
    else:
        count = 0
    tenki_list.append(count)
print(max(tenki_list))

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

Solution (Python):
S = input()

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

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

Solution (Python):
weather = input()
answer = 0

if weather == 'SSS':
    answer = 0
elif weather == 'SSR' or weather == 'SRS' or weather == 'RSS' or weather == 'RSR':
    answer = 1
elif weather == 'RRR':
    answer = 3
else:
    answer = 2

print(answer)

Solution (Python):
tenki = str(input())
count = 0
tenki_list = []
for n in tenki:
    if n == 'R':
        count +=1
    else:
        count = 0
    tenki_list.append(count)
print(max(tenki_list))

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

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):
a = str(input())
cnt = 0
ans = 0
for i in range(len(a)):
    if a[i] == 'S': 
        ans = max(ans, cnt)
        cnt = 0
    else: cnt += 1
print (max(cnt, ans))

Solution (Python):
S = input()

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

if ans == 2:
    if S[1] == "R":
        ans = 2
    else:
        ans = 1
print(ans)

Solution (Python):
s = input()
res = 0
f = 0
for i in s:
    if i == 'R':
        if f:
            res += 1
        else:
            f = 1
            res = 1
    else:
        f = 0
print(res)

Solution (Python):
S = input()

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

Solution (Python):


def get_input() -> str:
    """
    標準入力を取得する.

    Returns:\n
        str: 標準入力
    """
    S = input()

    return S


def main(S: str) -> None:
    """
    メイン処理.

    Args:\n
        S (str): 天気の記録（|S| = 3, Sの各文字は"S"または"R"）
    """
    
    ans = S.count("R") - (S == "RSR")

    
    print(ans)


if __name__ == "__main__":
    
    S = get_input()

    
    main(S)

Solution (Python):
S = input()

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

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

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

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

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

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

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

Solution (Python):
def abc175_a_1():
    def solve():
        
        if s.count('RRR'):
            return 3
        if s.count('RR'):
            return 2
        if s.count('R'):
            return 1
        return 0

    s = input()
    print(solve())

if __name__ == '__main__':
    abc175_a_1()

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

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

Solution (Python):
input_count =input()

input_count = list(input_count)
count = 0
count2 = 0
for i in range(len(input_count)):
  if input_count[i] == 'R':
    count2 += 1
  else:
    count2 = 0
  if count2 >= count:
    count =count2
print(count)

Solution (Python):
s = raw_input()
count = 0
a = 0
for j in range(len(s)):
	if s[j] == 'R':
		count +=1
	else:
		count = 0
	a = max(count, a)
print a

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

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

Solution (Python):
s = input()

w_l = s.split('S')
print(max([m for m in map(len, w_l)]))

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

Solution (Python):
a = input()

if a[0]=='R' and a[1]=='R' and a[2]=='R':
  res = 3
elif  a[0]=='R' and a[1]=='R':
  res = 2
elif  a[1]=='R' and a[2]=='R':
  res = 2  
elif  a[0]=='R':
  res = 1
elif  a[1]=='R':
  res = 1
elif  a[2]=='R':
  res = 1 
else:
  res = 0

res = int(res)
print(res)

Solution (Python):
A = input()

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

Solution (Python):

s = input()
r = 0
l = 'R'
for i in s:
    r = 1 if i == 'R' and l == 'S' else r
    r += 1 if i == 'R' and l == 'R' else 0
    l = i

print(r)