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()
k = S.count("R")
if k == 2:
    if S[1] == "S":
        print(1)
    else:
        print(2)
else:
    print(k)

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


def read():
    S = input().strip()
    return S,


def solve(S):
    ans = 0
    rain = 0
    for s in S:
        if s == "R":
            rain += 1
        else:
            ans = max(ans, rain)
            rain = 0
    ans = max(ans, rain)
    return ans


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Solution (Python):
def resolve():
    S = input()

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

Solution (Python):
s=input()
ans=chk=0
for i in s:
    if i=="R":
        chk+=1
    else:
        chk=0
    ans=max(ans,chk)
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=raw_input()

def solve(s):
    arr=list(s.split("S"))
    return len(max(arr,key=len))
print(solve(s))

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

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

Solution (Python):
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

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

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

def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
INF = 10 ** 18
MOD = 10**9+7

Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()


s = ri()
cnt = 0
flag = False
ans = 0
if s[0] == 'R':
    cnt+=1
    flag = True
    ans = 1
for i in range(1, 3):
    if s[i] == 'R':
        if flag :
            cnt+=1
        else:
            flag = True
            cnt = 1
    else:
        flag = False
    ans=  max(ans, cnt)
print(ans)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
import random
from collections import deque
from decimal import *
import queue
from functools import reduce

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	S = inputStr()
	ans = 0

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




if __name__ == "__main__":
	main()

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

Solution (Python):
LL = input()


count = 0
maxcount = 0

for ll in LL:
    if ll == "R":
        count+= 1
    else:
        count = 0
    
    if maxcount <= count:
        maxcount = count

print(maxcount)

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
input = sys.stdin.readline
INF = float("inf")



def main():
    S = input()[:-1]
    if "RRR" in S:
        print(3)
    elif "RR" in S:
        print(2)
    elif "R" in S:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
S = input()

ans = S.count('R')
if ans == 2 and S[1] == 'S':
  ans = 1
print(ans)

Solution (Python):


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

Solution (Python):

import sys

sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read


sys.setrecursionlimit(10**7)
import math

import bisect
import numpy as np




INF = 1 << 50


def run():
    S = input()
    ans = 0
    max_val = 0
    for s in S:
        if s == 'R':
            ans += 1
            max_val = max(max_val, ans)
        else:

            ans = 0
    print(max_val)

if __name__ == "__main__":
    run()

Solution (Python):
S = input()
cnt = 0
cmax = 0
for c in S:
  if c == "R":
    cnt += 1
    if cmax < cnt:
      cmax = cnt
  else:
    cnt = 0
print(cmax)

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

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

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

 
if __name__ == "__main__":
  	main()

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

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


def readstr():
    return input().strip()


def readint():
    return int(input())


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


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


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


if __name__ == "__main__":
    main()

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

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

Solution (Python):
a = input()
if a == 'SSS':
  print(0)
elif a == 'RSS' or a == 'SRS' or a=='SSR' or a=='RSR':
  print(1)
elif a == 'RRS' or a== 'SRR':
  print(2)
else:
  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):

n = input()

ret = 0
if n.count("R"):
    ret = 1
if n.count("RR"):
    ret = 2
if n.count("RRR"):
    ret = 3
print(ret)

Solution (Python):
S = input()

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

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

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

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

main()

Solution (Python):
s = list(input())
ans = 0
a = []
if s[0] == "R":
  ans += 1
else:
  a += [ans]
  ans = 0
if s[1] == "R":
  ans += 1
else:
  a += [ans]
  ans = 0
if s[2] == "R":
  ans += 1
else:
  a += [ans]
  ans = 0
a += [ans]
print(max(a))

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

Solution (Python):
def main():
    S = input()
    if S.count('R') == 0:
        print(0)
        exit()
    cnt = 1
    for i in range(2):
        if S[i] == 'R' and S[i+1] == 'R':
            cnt += 1 

    print(cnt)

if __name__ == "__main__":
    main()

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

Solution (Python):

MOD = 10 ** 9 + 7
INFI = 10**10

import math
from collections import deque
import itertools
import heapq

from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint




def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default




def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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


if __name__ == "__main__":

    main()

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

Solution (Python):
if __name__=="__main__":
    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):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines

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


import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    s = input()

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

if __name__ == "__main__":
    resolve()

Solution (Python):
a=input()

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

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

    maxren = 0
    ren = 0
    for c in s:
        if c == "R":
            ren += 1
            maxren = max(maxren, ren)
        else:
            ren = 0
    print(maxren)


main()

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

count = 0
ans=0

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

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

Solution (Python):
import sys
input=lambda: sys.stdin.readline().rstrip()
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 s=="SSS":
    print(0)
else:
    print(1)

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

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

ans = max(ans, cnt)
print(ans)

Solution (Python):
inp = input()

print(max(map(len, inp.split("S"))))

Solution (Python):
import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
def celi(a,b):
    return -(-a//b)
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

Solution (Python):


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


if __name__ == "__main__":
    solve()

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

Solution (Python):




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

    s = input().rstrip()
    ans = 0
    count = 0

    for c in s:
        if c == "R":
            count += 1
        else:
            if ans < count:
                ans = count
            count = 0

    if ans < count:
        ans = count
    print(ans)


if __name__ == "__main__":
    resolve()

Solution (Python):
s=input()

c=s.count('R')
if c==2 and s=='RSR':
    c=1
print(c)

Solution (Python):
from sys import stdin, setrecursionlimit

setrecursionlimit(10 ** 7)

from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter
from itertools import combinations, permutations, combinations_with_replacement
from itertools import accumulate
from math import ceil, sqrt, pi, radians, sin, cos

MOD = 10 ** 9 + 7
INF = 10 ** 18






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

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

Solution (Python):
s = input()
if 'R' not in s:
  print(0)
elif s[1] == 'S':
  print(1)
else:
  print(s.count('R'))

Solution (Python):



import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    S = i2s()
    if 'RRR' == S:
        print(3)
    elif 'RR' in S:
        print(2)
    elif 'R' in S:
        print(1)
    else:
        print(0)
    return


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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

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

Solution (Python):
s = input()

if 'RRR' in s:
   result = 3
elif 'RR' in s:
   result = 2
elif 'R' in s:
   result = 1
else:
   result = 0

print(result)

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do(): 
    s=STR()
    ans=0
    temp=0
    for i in s:
        if i=='R':
            temp+=1
            ans=max(temp,ans)
        else:
            temp=0
    print(ans)
    
if __name__ == '__main__':
    do()

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):
mod = 10**9 + 7
def solve():
    s = input() + 'S'
    ans = 0
    tmp = 0
    for c in s:
        if c == 'R':
            tmp += 1
        else:
            tmp = 0
        ans = max(ans, tmp)
    print(ans)
t = 1
while t > 0:
    solve()
    t -= 1

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

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()

    s = SI()
    cnt = 0
    ans = 0
    for x in s:
        if x == 'R':
            cnt +=1
            ans = max(ans,cnt)
        else: cnt = 0
    print(ans)
if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    S = input()
    res = 0
    cnt = 0
    for s in S:
        if s == "R":
            cnt += 1
            res = max(res, cnt)
        else:
            cnt = 0
    print(res)


if __name__ == '__main__':
    resolve()

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

Solution (Python):



import sys


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


def main():
    s = std_in()
    if "RRR" in s:
        print(3)
    elif "RR" in s:
        print(2)
    elif "R" in s:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    main()

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

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

Solution (Python):



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

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

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

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

Solution (Python):
S = input()
Sl = S.split("S")
maxi = 0
for s in Sl:
    maxi = max(maxi, len(s))
print(maxi)

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

if __name__=="__main__":
    main()

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_s = lambda: readline().rstrip().decode('utf-8')
in_nl = lambda: list(map(int, readline().split()))
in_nl2 = lambda H: [in_nl() for _ in range(H)]
in_map = lambda: [s == ord('.') for s in readline() if s != ord('\n')]
in_map2 = lambda H: [in_map() for _ in range(H)]
in_all = lambda: map(int, read().split())


def main():

    s = in_s()

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

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    count = 0
    for i in input():
        if i != "R" and count > 0:
            break
        elif i == "R":
            count += 1
    print(count)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
S = input()

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

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

Solution (Python):


from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

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


def main():
	S = input()
	cnt = 0
	val = 0
	for i in S:
		if i != "S":
			val += 1
			cnt = max(val, cnt)
		else:
			cnt = max(val, cnt)
			val = 0

	cnt = max(val, cnt)
	print(cnt)


	




if __name__ == '__main__':
	main()

Solution (Python):


import os,sys
from io import BytesIO, IOBase

def main():
    s = input().strip()
    cou=maxi=0
    for i in s:
        if i=='R':
            cou += 1
        else:
            maxi = max(maxi,cou)
            cou = 0
    maxi = max(maxi,cou)
    print(maxi)

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()
for i in range(3,0,-1):
    if(('R'*i) in s):
        print(i)
        exit()
print(0)

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

Solution (Python):
import sys


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


def main():
    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)



if __name__ == "__main__":
    main()

Solution (Python):

import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial, gcd
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10 ** 7)
enu = enumerate
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep="\n")

S = input()

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

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

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
l=[]
for i in range(len(s)):
    if(s[i]=='R'):
        count+=1
    else:
        l.append(count)
        count=0
l.append(count)
print(max(l))