s = list(input())

ans = 0
a = 0
for i in range(len(s)):
    if s[i] == 'R':
        a += 1
    else:
        a = 0
    ans = max(ans,a)

print(ans) s = list(input()) s list(input()) list input() input ans = 0 ans 0 a = 0 a 0 for i in range(len(s)):
    if s[i] == 'R':
        a += 1
    else:
        a = 0
    ans = max(ans,a) i range(len(s)) range len(s) len s if s[i] == 'R':
        a += 1
    else:
        a = 0
     s[i] == 'R' s[i] s i 'R' a += 1 a 1 a = 0 a 0 ans = max(ans,a) ans max(ans,a) max ans a print(ans) print ans a += 1 1 a s = list(input()) list(input()) s ans = 0 0 ans ans = max(ans,a) max(ans,a) ans a = 0 0 a a = 0 0 a
s = list(input())

ans = 0
a = 0
for i in range(len(s)):
    if s[i] == 'R':
        a += 1
    else:
        a = 0
    ans = max(ans,a)

print(ans)