S = list(input())
count = 0
ans = 0

for i in range(len(S)):
    if S[i] == 'R':
        count += 1
        if ans < count:
            ans = count
    else:
        count = 0

    
print(ans) S = list(input()) S list(input()) list input() input count = 0 count 0 ans = 0 ans 0 for i in range(len(S)):
    if S[i] == 'R':
        count += 1
        if ans < count:
            ans = count
    else:
        count = 0

     i range(len(S)) range len(S) len S if S[i] == 'R':
        count += 1
        if ans < count:
            ans = count
    else:
        count = 0

     S[i] == 'R' S[i] S i 'R' count += 1 count 1 if ans < count:
            ans = count
     ans < count ans count ans = count ans count count = 0 count 0 print(ans) print ans ans = count count ans count += 1 1 count ans = 0 0 ans S = list(input()) list(input()) S count = 0 0 count count = 0 0 count
S = list(input())
count = 0
ans = 0

for i in range(len(S)):
    if S[i] == 'R':
        count += 1
        if ans < count:
            ans = count
    else:
        count = 0

    
print(ans)