S = input()

count = 0
max = 0

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

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

count = 0
max = 0

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

print(max)