s = input()
ans = 0
curr = 0
for i in range(3):
  if s[i]== "R":
    curr += 1
  else:
    ans = max(ans, curr)
    curr =0
else:
  ans = max(ans, curr)
print(ans) s = input() s input() input ans = 0 ans 0 curr = 0 curr 0 for i in range(3):
  if s[i]== "R":
    curr += 1
  else:
    ans = max(ans, curr)
    curr =0
else:
  ans = max(ans, curr) i range(3) range 3 if s[i]== "R":
    curr += 1
  else:
    ans = max(ans, curr)
    curr =0 s[i]== "R" s[i] s i "R" curr += 1 curr 1 ans = max(ans, curr) ans max(ans, curr) max ans curr curr =0 curr 0 ans = max(ans, curr) ans max(ans, curr) max ans curr print(ans) print ans curr = 0 0 curr ans = max(ans, curr) max(ans, curr) ans s = input() input() s curr += 1 1 curr curr =0 0 curr ans = max(ans, curr) max(ans, curr) ans ans = 0 0 ans
s = input()
ans = 0
curr = 0
for i in range(3):
  if s[i]== "R":
    curr += 1
  else:
    ans = max(ans, curr)
    curr =0
else:
  ans = max(ans, curr)
print(ans)