Problem:
 Score : 100 points    Problem Statement We have weather records at AtCoder Town for some consecutive three days. A string of length 3 , S , represents the records - if the i -th character is S , it means it was sunny on the i -th day; if that character is R , it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.      Constraints  |S| = 3  Each character of S is S or R .         Input Input is given from Standard Input in the following format:  S       Output Print the maximum number of consecutive rainy days in the period.        Sample Input 1 RRS      Sample Output 1 2  We had rain on the 1 -st and 2 -nd days in the period. Here, the maximum number of consecutive rainy days is 2 , so we should print 2 .       Sample Input 2 SSS      Sample Output 2 0  It was sunny throughout the period. We had no rainy days, so we should print 0 .       Sample Input 3 RSR      Sample Output 3 1  We had rain on the 1 -st and 3 -rd days - two "streaks" of one rainy day, so we should print 1 .

Solution (Python):

import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import*
from io import BytesIO, IOBase
def vsInput():
    sys.stdin = open('input.txt', 'r')
    sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
ALPHA='abcdefghijklmnopqrstuvwxyz'
M=10**9+7
EPS=1e-6
def value():return tuple(map(int,input().split()))
def array():return [int(i) for i in input().split()]
def Int():return int(input())
def Str():return input()
def arrayS():return [i for i in input().split()]






s=list(input().split('S'))



ans=0
for i in s:
    ans=max(len(i),ans)

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()
renzoku = 0
res = []
for i in range(3):
    if s[i] == "R":
        renzoku += 1
    else:
        renzoku = 0
    res.append(renzoku)
print(max(res))

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

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

print(max_count)

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

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

s = input()
a = b = c = 0
a = (s[0] == 'R') * 1
b = (s[1] == 'R') * (1 + a)
c = (s[2] == 'R') * (1 + b)
print(max(a, b, c))

Solution (Python):
s=input()
ans=0
ren=False
for i in s:
  if i=="R":
    if ren:
      ans+=1
    else:
      ans=1
      ren=True
  else:
    ren=False
print(ans)

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

Solution (Python):
weather = input().rstrip()
rainyDays = sum([c=="R" for c in weather])
if weather[1] == "S":
  rainyDays = min(rainyDays, 1)
print(rainyDays)

Solution (Python):
import os
import heapq
import sys,threading
import math
import bisect
import operator
from collections import defaultdict
sys.setrecursionlimit(10**5)
from io import BytesIO, IOBase
def gcd(a,b):
    if b==0:

        return a
    else:
        return gcd(b,a%b)
def power(x, p,m):
    res = 1
    while p:
        if p & 1:
            res = (res * x) % m
        x = (x * x) % m
        p >>= 1
    return res
def inar():
    return [int(k) for k in input().split()]

def lcm(num1,num2):
    return (num1*num2)//gcd(num1,num2)

def main():
    
    t=1
    for _ in range(t):
        st=input()
        c=0
        ans=0
        res=0
        for i in range(3):
            if c==0 and st[i]=="R":
                c=1
                ans+=1
                continue
            if c==1 and st[i]=="R":
                ans+=1
            else:
                res=max(res,ans)
                ans=0
        res=max(res,ans)
        print(res)





BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main()

Solution (Python):



S=input()

ans=0
count=0

if S[0]=="R":
    count=1

for i in range (1,len(S)):
    if S[i]=="R":
        if count>0:
            pass
        else:
            count=1
        if S[i-1]=="R":
            count+=1
        else:
            if count>ans:
                ans=count
                count=0
else:
    if count>ans:
        ans=count

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()
print(len(max(s.split("S"))))

Solution (Python):


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

Solution (Python):
S = input()

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

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

Solution (Python):
def getContinueRainDay(weathers):
  maxChainNum = 0
  nowChainNum = 0
  preDayRain = True

  for weather in list(weathers):
    if weather == "S":
      maxChainNum = nowChainNum if maxChainNum < nowChainNum else maxChainNum
      nowChainNum = 0
      preDayRain = False
    else:
      nowChainNum = nowChainNum+1 if preDayRain else 1
      preDayRain = True
  
  maxChainNum = nowChainNum if maxChainNum < nowChainNum else maxChainNum

  return maxChainNum

if __name__ == "__main__":
  S = input()
  print (getContinueRainDay(S))

Solution (Python):
a = input()
if a == "RRR":
  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
flag = 0
for i in s:
    if(i=='R'):
        cnt += 1 
    else:
        ans = max(ans,cnt)
        cnt = 0
if(flag == 0):
    ans = max(ans,cnt)
print(ans)

Solution (Python):
def main():
    S = input()
    num = S.count('S')
    if num==3:
        print('0')
    if num==2: 
        print('1')
    if num==1:
        if S[1]=='S':
            print('1')
        else:
            print('2')
    if num==0:
        print('3')
        


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    S = input()
    num = S.count('S')
    if num==3:
        print('0')
    if num==2: 
        print('1')
    if num==1:
        if S[1]=='S':
            print('1')
        else:
            print('2')
    if num==0:
        print('3')
        


if __name__ == "__main__":
    main()

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

Solution (Python):
S = input()

if S.count('R') != 2:
    print(S.count('R'))
elif S.count('RR') == 1:
    print(2)
else:
    print(1)

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

print(ans)

Solution (Python):
S = input()

ans = 0

if S == "RRR":
    ans = 3
elif S == "RRS":
    ans = 2
elif S == "RSR":
    ans = 1
elif S == "RSS":
    ans = 1
elif S == "SRR":
    ans = 2
elif S == "SRS":
    ans = 1
elif S == "SSR":
    ans = 1
elif S == "SSS":
    ans = 0

print(ans)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

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

Solution (Python):
s = input()

ans = 0
temp = 0

for c in s :
  if c == 'S' :
    temp = 0
  else :
    temp += 1
    if temp > ans :
      ans = temp

print(ans)

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

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

if s[1] == 'R':
    print(s.count('R'))
else:
    print(0 if s.count('R') == 0 else 1)

Solution (Python):
s=list(input())
s=[str(x) for x in s]
count=0
num=[0]
for i in range(len(s)):
  if (s[i]=='R'):
    count+=1
    num.append(count)
  elif (s[i]=='S'):
    count=0
    
print(max(num))

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

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

Solution (Python):

s = str(input())
r = 0
a = s.find("R")
if a==-1:
    print(r)
else:
    r+=1
    if a<2:
        while(s[a+1]=="R"):
            r+=1
            a+=1
            if a==2:
                break
    print(r)

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

Solution (Python):
s = input()
res = 0
if s == "RSR":
    print(1)
    exit()
for i in range(3):
    if s[i] == "R":
        res += 1
print(res)

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

for i in range(1,4):
  r="R"*i
  if r in s:
    ans=i
print(ans)

Solution (Python):
s = input()

print(max([len(elem) for elem in s.split('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()

rain = 0
ans = 0

for i in range(len(s)):
    if s[i] == "R":
        rain += 1
        ans = max(ans, rain)
    else:
        rain = 0

print(ans)

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

Solution (Python):
str=input()
flag=0
ans=0

for w in str:
    if w == 'R':
        flag+=1
        if (flag>ans):
            ans=flag
    else:
        flag = 0

print(ans)

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

Solution (Python):
s=input()
ans=0
retur=[]
for i in s:
    if(i=='R'):
        ans+=1
    else:
        ans=0
    retur.append(ans)
print(max(retur))

Solution (Python):
s = input()

cont=0

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

elif s[0]=="R" or s[1]=="R" or s[2]=="R":
    cont=1
else:
    cont=0
print(cont)

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

Solution (Python):
S=input()
Sc=S.count("R")
SSc=S.count("RR")
if Sc==3:
  print(3)
elif SSc==1:
  print(2)
elif Sc==0:
  print(0)
else:
  print(1)

Solution (Python):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



S = str(input())

count = 0
max_count = 0
for i in range(3):
    if S[i] == 'R':
        if i >= 1 and S[i-1] == 'R':
            count += 1
        else:
            count = 1
    max_count = max(count,max_count)

print(max_count)

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

Solution (Python):
S=input()
count=0
for i in S:
    if i=='R':
        count+=1
if S=="RSR":
    count-=1
print(count)

Solution (Python):
s = input()
ans = s.count("R")
if s == "RSR":
    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 'RRR' in S:
  print(3)
  exit()
if 'RR' in S:
  print(2)
  exit()
if 'R' in S:
  print(1)
  exit()
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())

before = None
count = 0
for v in list(S):
    if (v == "R"):
        if (count == 0):
            count = 1
        if (before == v):
            count = count + 1
    before = v

print(count)

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

Solution (Python):
S = input()

ans = 0
if S == "RRR":
    ans = 3
elif S[:2] == "RR" or S[1:] == "RR":
    ans = 2
elif S[0] == "R" or S[1] == "R" or S[2] == "R":
    ans = 1

print(ans)

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

Solution (Python):
s = input()
cnt, max_c = 0, 0
for si in s:
    if si == 'R':
        cnt += 1
    max_c = max(max_c, cnt)
    if si != 'R':
        cnt = 0
print(max_c)

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
a=0

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

print(a)

Solution (Python):
s = input().split('S')
max = 0
for t in s:
  if max < len(t):
    max = len(t)
print(max)

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


def main():
    s = input().rstrip()
    rs = s.split("S")
    print(len(max(rs)))


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
cnt = 0
if S[0] == 'R' and S[1] == 'R' and S[2] == 'R':
    cnt = 3
else:
    if S.count('R') == 2:
        for i in range(2):
            if S[i] == 'R' and S[i+1] == 'R':
                cnt = 2
                break
            elif S[i] != S[i+1] and S[i+1] != S[i+2]:
                cnt = 1
                break
    if S.count('R') == 1:
        cnt = 1
print(cnt)

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

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 = input().split("S")
print(len(max(s)))

Solution (Python):
S = input()

t = 0
result = 0
for c in S:
    if c == 'R':
        t += 1
    else:
        t = 0
    result = max(result, t)
print(result)

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

Solution (Python):

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

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

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


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


def main():
    S = input()
    if S == "RSR":
        print(1)
    else:
        print(S.count("R"))
    return


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()
count = 0
ans = 0

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

Solution (Python):
a=input()

c=3

while True:
    
    if "R"*c in a :
        print(c) 
        break
        
    c-=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):
import sys

S = sys.stdin.readline().rstrip()

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):
S = input()
cnt = 0
for i in range(3):
    if S[i] == 'R':
        
        if i == 0 or S[i - 1] == 'R':
            cnt += 1
        else:
            cnt = 1
print(cnt)

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

Solution (Python):
s = input()

ans = 0
for i in range(1, 4):
    if "R" * i in s:
        ans = i

print(ans)

Solution (Python):
s = input()

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

print(max(m, cnt))

Solution (Python):
S = input()

for s in ['RRR', 'RR', 'R']:
    if s in S:
        print(len(s))
        exit()
print(0)

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
S=input()
print(max(i for i in range(4)if S.count("R"*i)))

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

Solution (Python):
s=input()
n=0
countmax=0
count=0
while n<3:
  if s[n]=="R":
    count+=1
    if countmax<count:
      countmax=count
  elif s[n]=="S":
    count=0
  n+=1
print(countmax)

Solution (Python):
import math


def main():
    s = list(input())
    if s.count("R") == 3:
        print(3)
        return
    if s[0] + s[1] == "RR" or s[2] + s[1] == "RR":
        print(2)
        return
    if s.count("R") >= 1:
        print(1)
        return
    print(0)


if __name__ == '__main__':
    main()

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
S = input()     
count = 0       
max_r = 0       


for moji in S:
    if moji == "R":
        count += 1
        if max_r < count:
            max_r = count
    else:
        count = 0
print(max_r)

Solution (Python):
def check(inpyt):
    count = 0
    if inpyt.count('S') == len(inpyt):
        return 0
    for ele in range(0, len(inpyt)):
        if ele < len(inpyt)+1:
            if inpyt[ele]=='R':
                try:
                    if inpyt[ele+1]==inpyt[ele]:
                        count +=1
                except IndexError as e:
                    pass
    return count+1
    


inpyt = list(input())
print(check(inpyt))

Solution (Python):
def clean(max_r, count):
  if max_r < count:
      max_r = count
  return max_r

mojiretsu = input()
count = 0
max_r = 0
for moji in mojiretsu:
  if moji == 'R':
    count += 1
  else:
    max_r = clean(max_r, count)
    count = 0
    
if count != 0:
  max_r = clean(max_r, count)
  
print(max_r)

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()
maxcnt = 0
cnt = 0
for i in range(len(S)):
  l = S[i]
  if l == 'R':
    cnt += 1
    maxcnt = cnt
  else:
    cnt = 0
print(maxcnt)

Solution (Python):
s=input();print(s.count('R')-(s=="RSR"))

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 == "RRS" or S == "SRR":
    print(2)
elif "R" in S:
    print(1)
else:
    print(0)

Solution (Python):
S = input()

cnt = 0
max_cnt=0

if S[0] == 'R':
    cnt += 1

for i in range(1,3):
    if S[i] == 'R':
        cnt+=1
        
    else:
        if cnt > max_cnt:
            max_cnt = cnt
        cnt = 0
if cnt > max_cnt:
    max_cnt = cnt        
if S[len(S)-1] == 'R' and max_cnt == 0:
    max_cnt = 1

print(max_cnt)

Solution (Python):
s=input().upper()
c=0
largest=0


for i in range(len(s)-1):
    if s[i] == "R":
        if c == 0:
            c+=1
        if s[i] == s[i+1]:
            c+=1
        
    else:
        
        if c > largest:
            largest=c
        c=0
    if i + 2 == len(s):
        if s[i+1] == "R" and c == 0:
            c+=1
        
        if c > largest:
            largest=c

print(largest)

Solution (Python):

import sys
input = sys.stdin.readline
def inps():
    return str(input())
def longest(s):
    max_now = 0
    max_glo = 0
    for i in range(len(s)):
        if s[i] == "R": max_now+=1
        else: max_now = 0
        if max_glo<max_now: max_glo=max_now
    return max_glo    

s = inps().rstrip()
print(longest(s))

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

Solution (Python):
import re
r = 0
s = input()
if 'R' not in s:
  print(0)
else:
  x = re.findall('R+',s)
  if len(x) == 2:
      print(1)
  else:
      print(len(x[0]))

Solution (Python):
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))

s = sorted(ins().split("S"), reverse=True)
print(len(s[0]))

Solution (Python):
S = input()

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

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

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

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

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

Solution (Python):

















import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
cnt = 0
max_cnt = -1
for s in S:
    if s == 'R':
        cnt += 1
    else:
        if max_cnt < cnt:
            max_cnt = cnt
        cnt = 0
if max_cnt < cnt:
    max_cnt = cnt
print(max_cnt)

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    S = rl().rstrip()
    if 'RRR' == S:
        print(3)
    elif 'RR' in S:
        print(2)
    elif 'R' in S:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    solve()

Solution (Python):
def main():
    S = input()
    for rep in range(3, -1, -1):
        tar = 'R' * rep
        if ~S.find(tar):
            print(rep)
            return


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 os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

a = input()
if a[0]=='R':
    ans=1
else:
    ans=0
res=ans
for i in range(1,3):
    if a[i]=='R':
        if a[i]==a[i-1]:
            ans+=1
        else:
            ans=1
    else:
        ans=0
    res=max(res,ans)
print(res)

Solution (Python):
s=input()
if s=='RRR':
    print(3)
elif s=='SSS':
    print(0)
elif s in ['RRS','SRR']:
    print(2)
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=input()
c=0
m=0
for i in s:
    if(i=='R'):
        c=c+1
        m=max(c,m)
    else:
        c=0
print(m)

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