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

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()
box = 0
ans = 0
for s in S:
    if s == "R":
        box += 1
    else:
        box = 0
    ans = max(ans, box)
print(ans)

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

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

Solution (Python):
if __name__ == '__main__':

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

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

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

Solution (Python):
S = input()
ans = 0
for k in range(3):
  if S[k] == 'R':
    ans += 1
if ans == 2:
  if S[1] == 'S':
    ans -= 1
print(ans)

Solution (Python):


s = str(input())

if s == "RRR":
    print(3)
elif s[0:2] == "RR" or s[1:3] == "RR":
    print(2)
elif "R" in set(list(s)):
    print(1)
else:
    print(0)

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

Solution (Python):
s = input()

m = 0
t = 0

for e in s:
    if e == "R":
        t += 1
        if m <= t:
            m = t
    else:
        t = 0

print(m)

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()
    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()
    if (c := s.count('R')) <= 1 or c == 3:
        print(c)
    else:
        if s[1] == 'S':
            print(1)
        else:
            print(2)




if __name__ == '__main__':
    main()

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

Solution (Python):


import math
import re
import numpy as np
import copy


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

Solution (Python):
N = input()
T = 1 if N == "RSR" else 0
N = list(N)
ans = 0
for n in N:
    if n == "R":
        ans += 1
print(ans - T)

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


import sys

input = iter(sys.stdin.read().splitlines()).__next__

S = input()

A = S.split('S')

res = max(map(len, A))

print(res)

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

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

Solution (Python):

rains = input()



max_r = 0
r_count = 0

for i in range(len(rains)):
    if rains[i] == "R":
        r_count += 1
    else:
        r_count = 0
    if max_r < r_count:
        max_r = r_count

print(max_r)

Solution (Python):
S = input()

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

Solution (Python):
N=input()

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

if N=="SRR" or N=="RRS" :
    print("2")
    exit()

if N=="SSS":
    print("0")
    exit()

print("1")

Solution (Python):
if __name__ == '__main__':
    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[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 "R" in s:
    print(1)
else:
    print(0)

Solution (Python):
s = list(input())
cnt = 0
ans = 0
for i in s:
    if i == "R":
        cnt += 1
        if ans < cnt:
            ans = cnt
    if i != "R":
        cnt = 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):
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):
s = input()
count = 0
ans = 0
for i in s:
  if i == "R":
    count += 1
    ans = max(ans, count)
  else:
    count = 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 s[1]=="R":
  print(s.count("R"))
else:
  print(min(1,s.count("R")))

Solution (Python):
S = input()

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

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

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

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

s = readline().decode().rstrip()

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

Solution (Python):
s = input()
count = 0
max = 0
for c in s:
  if c == 'R':
    count += 1
  else:
    if count > max:
      max = count
    count = 0
if count > max:
      max = count
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 numpy as np












s = str(input())

c,C=0,0

for i in s:
    if i=='R':
        c+=1

    else:
        C=max(c,C)
        c=0

print(max(C,c))

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

for i in range(3):
    if S[i] == 'S':
        count = 0
    else:
        count += 1
    if count > result:
        result = count

print(result)

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

Solution (Python):
S = input()

count = 0
m = 0

for s in S:
    if s == "R":
        count += 1
    else:
        m = max(m, count)
        count = 0
m = max(m, count)

print(m)

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

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[0] == "R" and S[1] == "R" and S[2] == "R":
    print(3)
    exit()

if S[0] == "R" and S[1] == "R":
    print(2)
    exit()

if S[1] == "R" and S[2] == "R":
    print(2)
    exit()

if "R" in S:
    print(1)
    exit()

print(0)

Solution (Python):
S = input()

print(("R" in S) + ("RR" in S) + ("RRR" in S))

Solution (Python):
if __name__ == '__main__':
    s = input().strip()
    ans = 0
    for l in range(4):
        p = "R" * l
        if s.find(p) >= 0:
            ans = max(ans, l)
    print(ans)

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):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

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

if __name__ == '__main__':
    resolve()

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):
Ss = input().rstrip()

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

print(ans)

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


sys.setrecursionlimit(999999999)



def resolve(test_def_name=""):
    x = input()

    if x.__contains__("RRR"):
        print(3)
        return
    if x.__contains__("RR"):
        print(2)
        return

    if x.__contains__("R"):
        print(1)
        return

    print(0)
    return



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

    def test_input_1(self):
        test_input = """RRS"""
        output = """2"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """SSS"""
        output = """0"""
        self.assertIO(test_input, output)

    def test_input_3(self):
        test_input = """RSR"""
        output = """1"""
        self.assertIO(test_input, output)

    
    def tes_t_1original_1(self):
        test_input = """データ"""
        output = """データ"""
        self.assertIO(test_input, output)



if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        
        resolve()

    else:
        
        unittest.main()

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

Solution (Python):


from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2, log10, pi
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key
from bisect import bisect_left


INF=1001001001
__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


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

def intinput():
    return int(input())

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

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

def bindex(a,x):
    i = bisect_left(a,x)
    if i != len(a) and a[i] == x:
        return i
    return None

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __radd__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x + self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x + self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rsub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x - self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x - self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rmul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rtruediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __rpow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(other.__x, self.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(other.__x, self.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")

    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x
    def __str__(self):
        return str(self.__x)



if __name__ == '__main__':
    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 = input()

count = 0
maxC = 0
for c in s:
    if c == 'R':
        count += 1
        maxC = max(count, maxC)
    else:
        count = 0
print(maxC)

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

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

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

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

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

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

print(ans)

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

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

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

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

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

Solution (Python):

import os
import sys
from io import BytesIO, IOBase




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


class union_find:
    def __init__(self, n):
        self.n = n
        self.rank = [0]*n
        self.parent = [int(j) for j in range(n)]
    
    def union(self,i,j):
        i = self.find(i)
        j = self.find(j)
        if self.rank[i] == self.rank[j]:
            self.parent[i] = j
            self.rank[j] += 1

        elif self.rank[i] > self.rank[j]:
            self.parent[j] = i
        else:
            self.parent[i] = j

    def find(self, i):
        temp = i
        if self.parent[temp] != temp:
            self.parent[temp] = self.find(self.parent[temp])
        return self.parent[temp]
from math import log2, ceil
from collections import deque, Counter as CC, defaultdict as dd
MOD = int(1e9+7)
def main():

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











        



if __name__ == "__main__":
    main()

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


    for i in range(len(s)):
        if s[i] == "R":
            tmp += 1
    if tmp == 3:
        print(3)
    elif tmp == 2:
        if s[1] == "S":
            print(1)
        else:
            print(2)
    elif tmp == 1:
        print(1)
    else:
        print(0)



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

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

Solution (Python):
s = input()
ans = 0
for i in s:
    if i == 'R':
        ans += 1
    elif ans != 0 and i == 'S':
        break
print(ans)

Solution (Python):





import math
import fractions
import sys
import bisect
import heapq  
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    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 power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod



def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


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

inf = 10 ** 18
mod = 10 ** 9 + 7

s = sr()
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 sys, math
import io, os

from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter

def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var) : sys.stdout.write('\n'.join(map(str, var))+'\n')
def out(var) : sys.stdout.write(str(var)+'\n')
from decimal import Decimal
from fractions import Fraction

INF = float('inf')
mod = int(1e9)+7


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

Solution (Python):
import copy
import math
import time
import statistics
import math
import itertools
import bisect
from decimal import *


def get_int():
    return int(input())

def get_string():
    return input()

def get_int_list():
    return [int(x) for x in input().split()]

def get_string_list():
    return input().split()

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

def get_string_char_list():
    return list(str(input()))


'''
while (idx < n) and ():

    idx += 1
'''

def main():

    start = time.time()

    
    

    s = get_string()

    wk = 0
    ans = 0
    for a in s:
        if a == "R":
            wk += 1
        else:
            wk = 0
        ans = max(ans, wk)

    print(ans)



if __name__ == '__main__':
    main()

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

Solution (Python):
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 = 0
for tenki in s:
    if tenki == "R":
        renzoku += 1
    else:
        renzoku = 0
    res = max(renzoku, res)
print(res)

Solution (Python):
import sys
import copy
from collections import deque
import collections
stdin = sys.stdin

mod = 10**9+7

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

s = ns()

if s[0]==s[1]==s[2]=='R':
    print(3)
    exit(0)

if s[0]==s[1]=='R' or s[1]==s[2]=='R':
    print(2)
    exit(0)

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

print(0)

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

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 _s(): return sys.stdin.readline().strip()


def main():
    s = _s()
    if s[1] == "S":
        return 1 if "R" in s else 0
    else:
        return s.count("R")


if __name__ == "__main__":
    print(main())

Solution (Python):

import sys

input = sys.stdin.readline


def S():
    return input().rstrip()


def I():
    return int(input())


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


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):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

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

def main():
    S = _S()
    daynum = S.count("R") if S!="RSR" else 1
    print(daynum)

main()

Solution (Python):
def main():
    X = input().strip()
    if X == "RRR":
        return 3
    if "RR" in X:
        return 2
    if "R" in X:
        return 1
    return 0


print(main())

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

Solution (Python):
S = input()

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

Solution (Python):
from sys import stdin

def main():

    input = stdin.readline

    S = str(input())[:-1]

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

if __name__ == "__main__":
    main()

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

Solution (Python):
s = input() + " "
ans = 0
cur = 0

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

print(ans)