s = input()
c = 0
a = 0
for i in s:
    if i == 'R':
        c += 1
        a = c
    else:
        c = 0
print(a) s = input() s input() input c = 0 c 0 a = 0 a 0 for i in s:
    if i == 'R':
        c += 1
        a = c
    else:
        c = 0 i s if i == 'R':
        c += 1
        a = c
    else:
        c = 0 i == 'R' i 'R' c += 1 c 1 a = c a c c = 0 c 0 print(a) print a a = c c a c = 0 0 c s = input() input() s a = 0 0 a c = 0 0 c c += 1 1 c
s = input()
c = 0
a = 0
for i in s:
    if i == 'R':
        c += 1
        a = c
    else:
        c = 0
print(a)