n = input()
ans = 0
temp = 0
for i in range(len(n)):
    if n[i] == "R":
        temp += 1
        ans = max(temp,ans)
    else:
        temp = 0

print(ans) n = input() n input() input ans = 0 ans 0 temp = 0 temp 0 for i in range(len(n)):
    if n[i] == "R":
        temp += 1
        ans = max(temp,ans)
    else:
        temp = 0 i range(len(n)) range len(n) len n if n[i] == "R":
        temp += 1
        ans = max(temp,ans)
    else:
        temp = 0 n[i] == "R" n[i] n i "R" temp += 1 temp 1 ans = max(temp,ans) ans max(temp,ans) max temp ans temp = 0 temp 0 print(ans) print ans n = input() input() n ans = max(temp,ans) max(temp,ans) ans temp = 0 0 temp temp = 0 0 temp temp += 1 1 temp ans = 0 0 ans
n = input()
ans = 0
temp = 0
for i in range(len(n)):
    if n[i] == "R":
        temp += 1
        ans = max(temp,ans)
    else:
        temp = 0

print(ans)