s = input()
counter = 0
ans = 0
for i in s:
    if i == "R":
        counter += 1
    else:
        counter = 0
    ans = max(ans, counter)
print(ans) s = input() s input() input counter = 0 counter 0 ans = 0 ans 0 for i in s:
    if i == "R":
        counter += 1
    else:
        counter = 0
    ans = max(ans, counter) i s if i == "R":
        counter += 1
    else:
        counter = 0
     i == "R" i "R" counter += 1 counter 1 counter = 0 counter 0 ans = max(ans, counter) ans max(ans, counter) max ans counter print(ans) print ans counter = 0 0 counter ans = max(ans, counter) max(ans, counter) ans counter = 0 0 counter counter += 1 1 counter s = input() input() s ans = 0 0 ans
s = input()
counter = 0
ans = 0
for i in s:
    if i == "R":
        counter += 1
    else:
        counter = 0
    ans = max(ans, counter)
print(ans)