s = list(input())
count = 0
maxcount = 0
for i in range(3):
    if s[i] == 'R':
        count += 1
        maxcount = count
    else:
        count = 0

print(maxcount) s = list(input()) s list(input()) list input() input count = 0 count 0 maxcount = 0 maxcount 0 for i in range(3):
    if s[i] == 'R':
        count += 1
        maxcount = count
    else:
        count = 0 i range(3) range 3 if s[i] == 'R':
        count += 1
        maxcount = count
    else:
        count = 0 s[i] == 'R' s[i] s i 'R' count += 1 count 1 maxcount = count maxcount count count = 0 count 0 print(maxcount) print maxcount s = list(input()) list(input()) s count = 0 0 count count += 1 1 count maxcount = count count maxcount count = 0 0 count maxcount = 0 0 maxcount
s = list(input())
count = 0
maxcount = 0
for i in range(3):
    if s[i] == 'R':
        count += 1
        maxcount = count
    else:
        count = 0

print(maxcount)