s=list(input())


c=[]
for i in range(3):
  cnt=0
  if s[i]=='R':
    
    
    while i<3:
      if s[i]=='R':
        cnt+=1
        i+=1
        
      else:
        break
        
  c.append(cnt)
    
print(max(c)) s=list(input()) s list(input()) list input() input c=[] c [] for i in range(3):
  cnt=0
  if s[i]=='R':
    
    
    while i<3:
      if s[i]=='R':
        cnt+=1
        i+=1
        
      else:
        break
        
  c.append(cnt)
     i range(3) range 3 cnt=0 cnt 0 if s[i]=='R':
    
    
    while i<3:
      if s[i]=='R':
        cnt+=1
        i+=1
        
      else:
        break
        
   s[i]=='R' s[i] s i 'R' while i<3:
      if s[i]=='R':
        cnt+=1
        i+=1
        
      else:
        break
        
   i<3 i 3 if s[i]=='R':
        cnt+=1
        i+=1
        
      else:
        break
        
   s[i]=='R' s[i] s i 'R' cnt+=1 cnt 1 i+=1 i 1 break c.append(cnt) c.append c append cnt print(max(c)) print max(c) max c i+=1 1 i cnt=0 0 cnt cnt+=1 1 cnt s=list(input()) list(input()) s c=[] [] c
s=list(input())


c=[]
for i in range(3):
  cnt=0
  if s[i]=='R':
    
    
    while i<3:
      if s[i]=='R':
        cnt+=1
        i+=1
        
      else:
        break
        
  c.append(cnt)
    
print(max(c))