s = input()
ans = 0

for i in range(1, 4):
    p = "R" * i
    if p in s:
        ans = i

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

for i in range(1, 4):
    p = "R" * i
    if p in s:
        ans = i

print(ans)