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

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

ans = max(tmp,ans)
print(ans)