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


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


print(ans)