S = input()

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

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

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

print(ans)
