#!/usr/bin/env python3
S = input()

total = 0
for i in range(len(S)):
    if "R" * (i + 1) in S:
        total = i + 1
ans = total
print(ans) S = input() S input() input total = 0 total 0 for i in range(len(S)):
    if "R" * (i + 1) in S:
        total = i + 1 i range(len(S)) range len(S) len S if "R" * (i + 1) in S:
        total = i + 1 "R" * (i + 1) in S "R" * (i + 1) "R" i + 1 i 1 S total = i + 1 total i + 1 i 1 ans = total ans total print(ans) print ans S = input() input() S total = 0 0 total total = i + 1 i + 1 total ans = total total ans
#!/usr/bin/env python3
S = input()

total = 0
for i in range(len(S)):
    if "R" * (i + 1) in S:
        total = i + 1
ans = total
print(ans)
