s = input().rstrip()
best = 0
c = 0

for char in s:
  if char=='R':
    c+=1
  else:
    c=0
    
  best = max(best,c)
  
print(best) s = input().rstrip() s input().rstrip() ().rstrip () input rstrip best = 0 best 0 c = 0 c 0 for char in s:
  if char=='R':
    c+=1
  else:
    c=0
    
  best = max(best,c)
   char s if char=='R':
    c+=1
  else:
    c=0
    
   char=='R' char 'R' c+=1 c 1 c=0 c 0 best = max(best,c) best max(best,c) max best c print(best) print best c = 0 0 c s = input().rstrip() input().rstrip() s c+=1 1 c best = max(best,c) max(best,c) best best = 0 0 best c=0 0 c
s = input().rstrip()
best = 0
c = 0

for char in s:
  if char=='R':
    c+=1
  else:
    c=0
    
  best = max(best,c)
  
print(best)