lst = list(input())

tmp = 0
ans = 0

for i in lst:
    if i == "R":
        tmp = tmp + 1
        ans = max(ans, tmp)
    else:
        tmp = 0

print(ans) lst = list(input()) lst list(input()) list input() input tmp = 0 tmp 0 ans = 0 ans 0 for i in lst:
    if i == "R":
        tmp = tmp + 1
        ans = max(ans, tmp)
    else:
        tmp = 0 i lst if i == "R":
        tmp = tmp + 1
        ans = max(ans, tmp)
    else:
        tmp = 0 i == "R" i "R" tmp = tmp + 1 tmp tmp + 1 tmp 1 ans = max(ans, tmp) ans max(ans, tmp) max ans tmp tmp = 0 tmp 0 print(ans) print ans ans = 0 0 ans tmp = 0 0 tmp ans = max(ans, tmp) max(ans, tmp) ans tmp = 0 0 tmp tmp = tmp + 1 tmp + 1 tmp lst = list(input()) list(input()) lst
lst = list(input())

tmp = 0
ans = 0

for i in lst:
    if i == "R":
        tmp = tmp + 1
        ans = max(ans, tmp)
    else:
        tmp = 0

print(ans)