# AtCoder Beginner Contest 175

# A - Rainy Season



S=eval(input())

if S=="RRR":

    print((3))

    exit()

if S=="SRR" or S=="RRS":

    print((2))

    exit()

if S=="SSS":

    print((0))

    exit()

else:

    print((1))
# AtCoder Beginner Contest 175

# A - Rainy Season



S=eval(input())



ans=0



for i in range (len(S)):

    if S[i]=="R":

        tempans=1

        for j in range (i+1,len(S)):

            if S[i]==S[j]:

                tempans+=1

            else:

                if tempans>ans:

                    ans=tempans

                break

        else:

            if tempans>ans:

                ans=tempans

print(ans)
# AtCoder Beginner Contest 175
# A - Rainy Season
S = eval(input())
if S == "RRR":
    print((3))
    exit()
if S == "SRR" or S == "RRS":
    print((2))
    exit()
if S == "SSS":
    print((0))
    exit()
else:
    print((1))

# AtCoder Beginner Contest 175
# A - Rainy Season
S = eval(input())
ans = 0
for i in range(len(S)):
    if S[i] == "R":
        tempans = 1
        for j in range(i + 1, len(S)):
            if S[i] == S[j]:
                tempans += 1
            else:
                if tempans > ans:
                    ans = tempans
                break
        else:
            if tempans > ans:
                ans = tempans
print(ans)

-if S == "RRR": -    print((3)) -    exit() -if S == "SRR" or S == "RRS": -    print((2)) -    exit() -if S == "SSS": -    print((0)) -    exit() -else: -    print((1)) +ans = 0 +for i in range(len(S)): +    if S[i] == "R": +        tempans = 1 +        for j in range(i + 1, len(S)): +            if S[i] == S[j]: +                tempans += 1 +            else: +                if tempans > ans: +                    ans = tempans +                break +        else: +            if tempans > ans: +                ans = tempans +print(ans)