S = input()

flag = 0
ans = 0
cnt = 0
for i in range(len(S)):
    if S[i] == "R":
        cnt += 1
        if ans < cnt:
            ans = cnt
    else:
        cnt = 0
print(ans) S = input() S input() input flag = 0 flag 0 ans = 0 ans 0 cnt = 0 cnt 0 for i in range(len(S)):
    if S[i] == "R":
        cnt += 1
        if ans < cnt:
            ans = cnt
    else:
        cnt = 0 i range(len(S)) range len(S) len S if S[i] == "R":
        cnt += 1
        if ans < cnt:
            ans = cnt
    else:
        cnt = 0 S[i] == "R" S[i] S i "R" cnt += 1 cnt 1 if ans < cnt:
            ans = cnt
     ans < cnt ans cnt ans = cnt ans cnt cnt = 0 cnt 0 print(ans) print ans cnt = 0 0 cnt ans = cnt cnt ans flag = 0 0 flag cnt = 0 0 cnt ans = 0 0 ans S = input() input() S cnt += 1 1 cnt
S = input()

flag = 0
ans = 0
cnt = 0
for i in range(len(S)):
    if S[i] == "R":
        cnt += 1
        if ans < cnt:
            ans = cnt
    else:
        cnt = 0
print(ans)
