s=eval(input())

count=0

if s.count('R')==1:

  print((1))

elif s.count('R')==3:

  print((3))

elif s.count('R')==2:

  if s[1]=="R":

    print((2))

  else:

    print((1))

else:

  print((0))
s=eval(input())

ans=0



for i in range(1,4):

  r="R"*i

  if r in s:

    ans=i

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

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

-count = 0 -if s.count("R") == 1: -    print((1)) -elif s.count("R") == 3: -    print((3)) -elif s.count("R") == 2: -    if s[1] == "R": -        print((2)) -    else: -        print((1)) -else: -    print((0)) +ans = 0 +for i in range(1, 4): +    r = "R" * i +    if r in s: +        ans = i +print(ans)