s = input()
ans=0
 

for i in range(1,4):
  R = 'R'*i
  if R in s:
    ans = i
    
print(ans) s = input() s input() input ans=0 ans 0 for i in range(1,4):
  R = 'R'*i
  if R in s:
    ans = i
     i range(1,4) range 1 4 R = 'R'*i R 'R'*i 'R' i if R in s:
    ans = i
     R in s R s ans = i ans i print(ans) print ans ans=0 0 ans s = input() input() s R = 'R'*i 'R'*i R ans = i i ans
s = input()
ans=0
 

for i in range(1,4):
  R = 'R'*i
  if R in s:
    ans = i
    
print(ans)