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