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

Solution (Python):
import sys

def input(): return sys.stdin.readline().strip()
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 INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 19 + 7
EPS = 10 ** -10

S = input()

cnt = 0
ans = 0
for i in range(3):
    if S[i] == 'R':
        cnt += 1
    else:
        cnt = 0
    ans = max(ans, cnt)
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):
def RunLengthEncoding(S):
    res = []
    N = len(S)
    i = 0
    while i < N:
        cnt = 1
        while i < N - 1 and S[i] == S[i + 1]:
            cnt += 1
            i += 1
        res.append((S[i], cnt))
        i += 1
    return res


S = input()
rle = RunLengthEncoding(S)
ans = 0
for k, v in rle:
    if k == "R":
        ans = max(ans, v)

print(ans)

Solution (Python):
S = list(input())
out = 0
if "R" in S:
    out += 1
for i in range(2):
    if S[i]==S[i+1] and S[i]=="R":
        out += 1
print(out)

Solution (Python):
s=input()

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

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

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

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

Solution (Python):

import sys
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
from itertools import accumulate

sys.setrecursionlimit(10**6)
INF = 10**12
m = 10**9 + 7

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

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

from decimal import *



S = input()

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

print(ans)

Solution (Python):
W=input()
M=0

if W[0]=="R" or W[1]=="R" or W[2]=="R":
    M=1

if W[0]==W[1]=="R" or W[1]==W[2]=="R":
    M=2

if W=="RRR":
    M=3

print(M)

Solution (Python):
def main():

    S = input()
    if "RRR" in S: return 3
    elif "RR" in S: return 2
    elif "R" in S:  return 1
    return 0
if __name__ == '__main__':
    print(main())

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

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

def test():
    i = I()
    li = LI()
    lsi = LSI()
    si = LS()
    print(i)
    print(li)
    print(lsi)
    print(si)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examA()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Solution (Python):
S = input()

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

Solution (Python):
S = input()
count = 0
ans = 0
for i in range(3):
    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 "RR" in S:
    print(2)
elif "R" in S:
    print(1)
else:
    print(0)

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

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

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

print(ans)

Solution (Python):
S = input()

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

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

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

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

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

print(ans)

Solution (Python):
def main():
    S = input()
    if 'RRR' == 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 '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

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):
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array





sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = iss()
    ret = 0
    tmp = 0
    for s in S:
        if s == 'R':
            tmp += 1
        else:
            tmp = 0
        ret = max(tmp, ret)
    print(ret)


if __name__ == '__main__':
    main()

Solution (Python):
'''
自宅用PCでの解答
'''
import math

import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)
mod = 10**9+7
dir = [(-1,0),(0,-1),(1,0),(0,1)]
alp = "abcdefghijklmnopqrstuvwxyz"

def main():
    s = input()
    ma = 0
    maa = 0
    for i in s:
        if i == "R":
            ma += 1
            if ma > maa:
                maa = ma
        else:
            ma = 0
    print(maa)

    return None

if __name__ == '__main__':
    main()

Solution (Python):




import sys
import heapq, functools, collections
import random
from collections import Counter, defaultdict


strr = input()










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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    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__':
    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())
mx=0
for i in range(1,4):
    if(s.count('R'*i)):
        mx=i
print(mx)

Solution (Python):
import sys
input = sys.stdin.readline
S = input()[: -1]
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 sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


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


print(solve())

Solution (Python):


s = input()

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

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

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

po = input()[:-1]

p = s(po)

cou = 0

for i in p:
    if i[0] == "R":
        cou = max(i[1],cou)
print(cou)

Solution (Python):
def main():
    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__':
    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()
ls = []
now = 0
for i in range(3):
    if S[i] == "R":
        now += 1
    else:
        ls.append(now)
        now = 0
ls.append(now)
print(max(ls))

Solution (Python):
S = input()
for i in range(3, -1, -1):
    if "R" * i in S:
        print(i)
        exit()

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

Solution (Python):

import sys, re
from decimal import *
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor, trunc, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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):
print max(len(s) for s in raw_input().split('S'))

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

sys.setrecursionlimit(500005)
stdin = sys.stdin

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

s = ns()
ans = 0
rep = 0
for i in s:
    if i == "R":
        rep += 1
    else:
        rep = 0
    ans = max(ans, rep)
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):
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()
for i in range(4)[::-1]:
    if 'R' * i in S:
        print(i)
        exit()

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    if "RRR" in S:
        ans = 3
    elif "RR" in S:
        ans = 2
    elif "R" in S:
        ans = 1
    else:
        ans = 0

    print(ans)


if __name__ == "__main__":
    main()

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

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

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

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


if __name__ == "__main__":
    solve()

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


from math import gcd, ceil

def pre(s):
    n = len(s)
    pi = [0] * n
    for i in range(1, n):
        j = pi[i - 1]
        while j and s[i] != s[j]:
            j = pi[j - 1]
        if s[i] == s[j]:
            j += 1
        pi[i] = j
    return pi


def prod(a):
    ans = 1
    for each in a:
        ans = (ans * each)
    return ans

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


def binary(x, length=16):
    y = bin(x)[2:]
    return y if len(y) >= length else "0" * (length - len(y)) + y


for _ in range(int(input()) if not True else 1):
    
    
    
    
    
    
    s = input()
    ans = 0
    cur = 0
    for i in s:
        if i == "R":
            cur += 1
        else:
            ans = max(ans, cur)
            cur = 0
    print(max(ans, cur))

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

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

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

Solution (Python):


import sys
sys.setrecursionlimit(300000)


def solve(S: str):
    if 'RRR' in S:
        ret = 3
    elif 'RR' in S:
        ret = 2
    elif 'R' in S:
        ret = 1
    else:
        ret = 0
    print(ret)
    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()

Solution (Python):
from itertools import groupby
res = 0
s = input()
for k, v in groupby(s):
    if k == 'R':
        res = max(res, len(list(v)))
print(res)