S = list(eval(input()))

count = 0

max_count = 0

for i in range(len(S)):

    a = S[i]

    if a == 'R':

       count += 1

    else:

       max_count = max(max_count, count)

       count = 0

max_count = max(max_count, count)

print(max_count)
S = eval(input())

if S == "RRR":

    print((3))

elif S == "RRS" or S == "SRR":

    print((2))

elif "R" in S:

    print((1))

else:

    print((0))
S = list(eval(input()))
count = 0
max_count = 0
for i in range(len(S)):
    a = S[i]
    if a == "R":
        count += 1
    else:
        max_count = max(max_count, count)
        count = 0
max_count = max(max_count, count)
print(max_count)

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

-S = list(eval(input())) -count = 0 -max_count = 0 -for i in range(len(S)): -    a = S[i] -    if a == "R": -        count += 1 -    else: -        max_count = max(max_count, count) -        count = 0 -max_count = max(max_count, count) -print(max_count) +S = eval(input()) +if S == "RRR": +    print((3)) +elif S == "RRS" or S == "SRR": +    print((2)) +elif "R" in S: +    print((1)) +else: +    print((0))