s = input()
answer  = 0
current = 0
for ch in s:
    if ch == "R":
        current += 1
    else:
        current = 0
    answer = max(answer, current)
 
print(answer) s = input() s input() input answer  = 0 answer 0 current = 0 current 0 for ch in s:
    if ch == "R":
        current += 1
    else:
        current = 0
    answer = max(answer, current)
  ch s if ch == "R":
        current += 1
    else:
        current = 0
     ch == "R" ch "R" current += 1 current 1 current = 0 current 0 answer = max(answer, current) answer max(answer, current) max answer current print(answer) print answer current = 0 0 current s = input() input() s current = 0 0 current current += 1 1 current answer  = 0 0 answer answer = max(answer, current) max(answer, current) answer
s = input()
answer  = 0
current = 0
for ch in s:
    if ch == "R":
        current += 1
    else:
        current = 0
    answer = max(answer, current)
 
print(answer)