s = input()
ans = 0
for i in range(3):
    if s[i] == "R":
        ans = 1

for i in range(2):
    if s[i:i+2] == "RR":
        ans = 2

if s == "RRR":
    ans = 3

print(ans) s = input() s input() input ans = 0 ans 0 for i in range(3):
    if s[i] == "R":
        ans = 1 i range(3) range 3 if s[i] == "R":
        ans = 1 s[i] == "R" s[i] s i "R" ans = 1 ans 1 for i in range(2):
    if s[i:i+2] == "RR":
        ans = 2 i range(2) range 2 if s[i:i+2] == "RR":
        ans = 2 s[i:i+2] == "RR" s[i:i+2] s i:i+2 i i+2 i 2 "RR" ans = 2 ans 2 if s == "RRR":
    ans = 3 s == "RRR" s "RRR" ans = 3 ans 3 print(ans) print ans s = input() input() s ans = 0 0 ans ans = 1 1 ans ans = 3 3 ans ans = 2 2 ans
s = input()
ans = 0
for i in range(3):
    if s[i] == "R":
        ans = 1

for i in range(2):
    if s[i:i+2] == "RR":
        ans = 2

if s == "RRR":
    ans = 3

print(ans)
