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 == "SSS":
  print(0)
elif S == "RRR":
  print(3)
elif S in ["RSS", "SRS", "SSR", "RSR"]:
  print(1)
else:
  print(2)

Solution (Python):
from collections import defaultdict,deque
import math
def main():
    s = input()
    tmp = s.count("R")
    if(s[1]=="S" and tmp>=1):
        print(1)
    else:
        print(tmp)
if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
import copy


s = input()



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

Solution (Python):
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    s = input()
    s = 'S' + s + 'S'
    cnt = 0
    tmp = 0
    for i in s:
        if i == 'S':
            cnt = max(cnt, tmp)
            tmp = 0
        else:
            tmp += 1
    print(cnt)


main()

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

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
ansmax = 0
if S[0] == "R":
    ans += 1
if S[1] == "R":
    ans += 1
else:
    ansmax = ans
    ans = 0
if S[2] == "R":
    ans += 1

ansmax=max(ans,ansmax)
print(ansmax)

Solution (Python):
S = input()

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

Solution (Python):
S = input()

day = 0
max_day = 0
for s in S:
    if s == 'R':
        day += 1
        max_day = max(day, max_day)
    else:
        day = 0

print(max_day)

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()
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
readline = sys.stdin.readline

def solve():
    S = readline().rstrip()

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

solve()

Solution (Python):

import math
from queue import PriorityQueue
import bisect
import copy
import time
from collections import Counter


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

Solution (Python):





import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    
    
    
    ss=readline().rstrip()

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

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

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

Solution (Python):
from collections import Counter
S = input()

C = Counter(S)

if C["R"] == 2 and S == "RSR":
  print(1)
else:
  print(C["R"])

Solution (Python):
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors


s = input()
ans = s.count('R')
if ans == 2 and s[1] != 'R':
    ans -= 1
print(ans)

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

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

Solution (Python):
S = list(input())
count = 0
tmp = 0

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

print(max(tmp, 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):
"""MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWO:,'..'xXWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO. .:kOo.,kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO. .lNWWo..lXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MNOxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxMMMMWKxoloxKWNc  .:xxd;  ,dxxxkXMXkxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxMM
MKc''''''''''''''''.  ..'''''.   .''''.  .''MMMWx..,:. .xXo''.  .''.  ..'';kMk;'''''.  .'.''.  .''''''.  ..''.   .''MM
MWNXNNNNNNNNNNNNNNNO' ;KNNNNNKo. cKNNNd. lXNMMMK; ,0Wx. :NWXXl .dNNO' ;KNNNWMWNNNNNXc .kNNNNx. cXNNNNNO' ;KNN0; 'ONNMM
MMMMMMMMMMMMMMMMMWM0' :NMMMMWMX: .OMWWx. oWMMMMWx. ';. .dNMWWo .xMM0' :NWWMMMMMMMMWWl .OMMMWk. lWWMMWM0' ;XMMX: ,KMMMM
MMMMMMWMWkccccccccc;. :NMWNNNKd. :XMMWx. oWMMMWKo. .',. .,ldx; .dMM0' :NMMMMMMMNNWMWl .OMMMWk. lWMMMMM0' ;XMMX: ,0MMMM
MMWXKNWMWxcc,. .;cc;. :XMk,''..'lKWMMWx. oWMNx:. .lONNKxl.     .xMM0' :NMMMMMM0:,oKO' ,KMMMMk. lWWNkoc,. .;::;. ,KMMMM
MMXc.lXMMWWWNd..xWM0' :NM0;  ;kXWMMMWNl  oWMK:.;xXWWMWXx:. ,c' .dMM0' :NMMMMMMKc. ...;kWMMMMk. lWWc .:;. .clc:. ,KMMMM
MWWx. lXMWMMMK, lWM0' :NMMNx'.,ldxxoc'   oWMWNKNWWWN0o' .:kNWo .dMM0' :NMMMMMMMNO;  ,OWWWMMMk. lWM' lXx. lNMMX: ,KMMMM
MMMWk'.,xKNX0c..kWM0' :NMMMMNkl;,'',:l:  oWMMMMMWMWO' 'l0WMWWo .xMM0' :NMMMMMMMMMNd. .oXWMMMk. lWMd.....;0WMMX: ,KMMMM
MMMMWKo'...'..:kWMM0' :NMMMMMMMWWNNWWWx. oWMMMMMMMMWOxXWMWMWWo .xMM0' :NMMMMMMMMMMMKl. ,kNMMk. lWMWKkxx0NMWMMX: ,KMMMM
MMMMMMMN0kxk0XNWMMWKl;xNMMMMMMMMMMMMWM0c;kWMMMMMMMMMMMWWMMMMWk;:OMMXl,dNMMMMMMMMMMMMWO; .dNM0c;kWWMMMMMMMMMMMNd,oXMMMM
MMMMMMMMWWMWMMMMMMMMMWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMWWMMWMMMMMMMMMMMMMMNkxKWMMWWMMMMMMMMMMMMMMWMMWMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM"""





import math;   		from collections import *
import sys;   		from functools import reduce
import time;   		from itertools import groupby



def input()         : return sys.stdin.readline()
def get_ints()      : return map(int, input().strip().split())
def get_list()      : return list(get_ints())
def get_string()    : return list(input().strip().split())
def printxsp(*args) : return print(*args, end="")
def printsp(*args)  : return print(*args, end=" ")


DIRECTIONS = [(+0, +1), (+0, -1), (+1, +0), (+1, -1)] 
NEIGHBOURS = [(-1, -1), (-1, +0), (-1, +1), (+0, -1),\
              (+1, +1), (+1, +0), (+1, -1), (+0, +1)]






s = input()
g = groupby(s)
ans = 0
for ke, val in g:
	if ke == 'R':
		ans = max(ans, len(list(val)))
print(ans)

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

Solution (Python):
def solve():
    s = input()
    ans = 0
    hoge = [0]
    for i in s:
        if i == "R":
            ans += 1
            hoge.append(ans)
        else:
            ans = 0
    print(max(hoge))
    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
import sys
from io import StringIO
import unittest


def resolve():
    s = input()
    
    
    

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

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """RRS"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """SSS"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """RSR"""
        output = """1"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

Solution (Python):
S = input()

arr = S.split("S")


brr = [len(arr[i]) for i in range(len(arr))]


print(max(brr))

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

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

print(ans)

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

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

Solution (Python):

from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools
import bisect
import math
import fractions
import sys
import copy


def L(): return sys.stdin.readline().split()


def I(): return int(sys.stdin.readline().rstrip())


def SL(): return list(sys.stdin.readline().rstrip())


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def IR(n): return [I() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def LIR1(n): return [LI1() for _ in range(n)]


def SR(n): return [SL() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def LR(n): return [L() for _ in range(n)]


def perm(n, r): return math.factorial(n) // math.factorial(r)


def comb(n, r): return math.factorial(
    n) // (math.factorial(r) * math.factorial(n-r))


alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007
INF = float("inf")


def main():
    S = SL()
    if S.count("R") == 1:
        print(1)
    elif S.count("R") == 2 and S[1] != "R":
        print(1)
    elif S.count("R") == 2:
        print(2)
    elif S.count("R") == 3:
        print(3)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
count = 0
res = 0
for c in S:
    if c == 'S':
        count = 0
    else:
        count += 1
        res = max(res, count)
print(res)

Solution (Python):
import sys
import bisect

t=1
for _ in range(t):
    
    
    
    
    
    r=0
    maxi=0
    s=input()
    for i in range(len(s)):
        if s[i]=='R':
            r+=1
        else:
            maxi=max(maxi,r)
            r=0
    maxi=max(maxi,r)
    print(maxi)

Solution (Python):
import sys
input = lambda:sys.stdin.readline().strip()
s = input()
ans = 0
i = 0
while i<len(s):
    if s[i]=='S':
        i+=1
        continue
    j = i
    while j<len(s) and s[j]=='R':
        j+=1
    ans = max(ans,j-i)
    i = j
print(ans)

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

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

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    S = input()
    if S.count("RRR"):
        print(3)
    elif S.count("RR"):
        print(2)
    elif S.count("R"):
        print(1)
    else:
        print(0)


main()

Solution (Python):
import sys
import math



input = sys.stdin.readline
 

def inp():
    return(int(input()))
def inara():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))



x=input()

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

Solution (Python):
s = input()
flag = 0
ans = 0
for i in s:
    if i =='R':
        if flag == 1:
            ans+=1
        else:
            ans = 1
            flag = 1
    else:
        flag = 0

print(ans)

Solution (Python):
s = input()
cnt = 0
for i in s:
    if "R" == i:
        cnt += 1
if s == "RSR":
    cnt = 1
print(cnt)

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


def main():
    S = input().rstrip()
    if S == "RRR":
        print(3)
    elif S == "RRS":
        print(2)
    elif S == "SRR":
        print(2)
    elif S == "SSS":
        print(0)
    else:
        print(1)


if __name__ == "__main__":
    main()

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

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

cnt = 0
max_cnt = 0

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

print(max_cnt)

Solution (Python):
def main():
    s = input()
    c = 0
    ans = 0
    for si in s:
        if si == "R":
            c += 1
        else:
            c = 0
        ans = max(ans, c)
    print(ans)

if __name__ == "__main__":
    main()

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

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

else:
    print(0)

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

s = input()
cnt = 0
if s == "RRR":
    print(3)
elif s.count("R") == 1 or s == "RSR":
    print(1)
elif s == "SSS":
    print(0)
else:
    print(2)

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

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

Solution (Python):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]

def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  s=S()
  if s.count('RRR')>0:
    return 3
  if s.count('RR')>0:
    return 2
  if s.count('R')>0:
    return 1
  return 0


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

solve()

Solution (Python):
s = input()

cnt = 0
mx = 0

for si in s:
    if si == "R":
        cnt += 1
    else:
        cnt = 0
    if mx < cnt:
        mx = cnt

print(mx)

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()
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()
tmp = 0
ans = 0
for i in range(3):
  if s[i] == 'R':
    tmp += 1
  else:
    tmp = 0
  ans = max(ans, tmp)
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):
tmp = input()
if tmp == 'RRR':
    print(3)
elif tmp == 'RRS' or tmp == 'SRR':
    print(2)
elif tmp == '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 = input()
ans = 0
for i in range(3, 0, -1):
    if 'R' * i in S:
        ans = i
        break
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 = str(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()

ans=0
temp=0

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

print(ans)

Solution (Python):
s = input()

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

print(ans)

Solution (Python):
S = input()

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

Solution (Python):
s = input()
if s == "SSS":
  print(0)
elif s == "RRR":
  print(3)
elif s == "SRR" or s == "RRS":
  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()

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
from collections import defaultdict as D
from functools import reduce
import numpy as np
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


S = _S()

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.count('R')==1 or s=='RSR':
  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 == "SRR" or s == "RRS":
    print(2)
else:
    print(3)

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

Solution (Python):
s = input()

rain = 0
prev = "R"
max = -1
for i in range(len(s)):
    if s[i] == "R":
        rain+=1
    else:
        rain=0
    if rain > max:
        max = rain
print(max)

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

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

Solution (Python):
s=input()
print(('R' in s)+('RR' in s)+('RRR' in s))

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

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

Solution (Python):
S = input()

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

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

s = rr()
ans = 0
if s == 'RRR':
    print(3)
elif 'RR' in s:
    print(2)
elif 'R' in s:
    print(1)
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[2] == S[1] == 'R':
    print(2)
elif S[0] == S[1] == S[2] == 'S':
    print(0)
else:
    print(1)

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

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

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

    cnt = s.count('R')
    if cnt != 2:
        print(cnt)
        return

    if s[0] == s[-1] == 'R':
        print(1)
    else:
        print(2)


if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin, setrecursionlimit
from collections import Counter, deque, defaultdict
from math import floor, ceil
from bisect import bisect_left
from itertools import combinations
setrecursionlimit(100000)

INF = int(1e10)
MOD = int(1e9 + 7)

def main():
    from builtins import int, map
    S = input()
    if 'R' not in S:
        print(0)
    else:
        if S in set({'RRR'}):
            print(3)
        elif S in set({'RRS', 'SRR'}):
            print(2)
        else:
            print(1)

if __name__ == '__main__':
    main()

Solution (Python):
s=input()

ans=0
cnt=0

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

print(ans)

Solution (Python):
import sys
import math


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

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.count("RR") >= 1:
    print(2)
elif S.count("R") >= 1:
    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
readline = sys.stdin.readline
read = sys.stdin.read



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

Solution (Python):
s = input()

c = s.count('R')
if c == 0:
    print(0)
elif c == 1:
    print(1)
elif c == 2:
    if s == 'RSR':
        print(1)
    else:
        print(2)
else:
    print(3)

Solution (Python):
weathers = input()

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

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

print(n)

Solution (Python):
import math
from collections import defaultdict,deque
from itertools import permutations
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

t=1

for _ in range(t):
    s=ip()
    ans=s.count('R')
    if(ans==2 and s[0]=='R' and s[2]=='R'):
        ans=1
    print(ans)

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









import os
import sys




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


if __name__ == "__main__":
    main()

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

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


if __name__ == "__main__":
    main()

Solution (Python):
S = input()

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

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

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

print(result)

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

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

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

Solution (Python):


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

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

Solution (Python):
S = input()

ans = S.count("R")

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

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

Solution (Python):
s=input("")
t=0
maxt=0
for i in s:
    if(i=="R"):
        t+=1
        if(t>maxt):
            maxt=t
    else:
        t=0
print(maxt)

Solution (Python):
import sys
import math
import collections
import bisect
import itertools



sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


ni = lambda: int(sys.stdin.readline().rstrip())
ns = lambda: map(int, sys.stdin.readline().rstrip().split())
na = lambda: list(map(int, sys.stdin.readline().rstrip().split()))
na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split()))




def main():
    s = input()
    ans = 0
    if s[0]==s[1]==s[2]=="R":
        ans = 3
    elif s[0]==s[1]=="R" or s[1]==s[2]=="R":
        ans = 2
    elif "R" in s:
        ans = 1

    print(ans)


if __name__ == '__main__':
    main()

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):
t = input()
ans = 0
maxans = 0
for i in t:
  if i =="R":
    ans += 1
  else:
    maxans = max(ans,maxans)
    ans = 0
print(max(maxans,ans))

Solution (Python):
def resolve():
    '''
    code here
    '''
    S = input()

    res = 0
    temp = 0
    for item in S:
        if item == 'R':
            temp += 1
        else:
            temp = 0

        res = max(res, temp)

    print(res)


if __name__ == "__main__":
    resolve()

Solution (Python):
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

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

s = s_in()

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):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))


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

Solution (Python):


S = input()

if S.find("RRR")>=0:
    out = 3
elif S.find("RR")>=0:
    out = 2
elif S.find("R")>=0:
    out = 1
else:
    out = 0
print(out)

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

Solution (Python):

import sys


def solve(S: str):
    a = 0
    m_a = 0
    for s in S:
        if s == "R":
            a+=1
            m_a  = max(a,m_a)
        else:
            a=0
    print(m_a)


    return



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

if __name__ == '__main__':
    main()