S = input()

mx = 0
c = 0
for si in S:
    if si == 'R':
        c += 1
        mx = max(mx, c)
    else:
        c = 0

print(mx) S = input() S input() input mx = 0 mx 0 c = 0 c 0 for si in S:
    if si == 'R':
        c += 1
        mx = max(mx, c)
    else:
        c = 0 si S if si == 'R':
        c += 1
        mx = max(mx, c)
    else:
        c = 0 si == 'R' si 'R' c += 1 c 1 mx = max(mx, c) mx max(mx, c) max mx c c = 0 c 0 print(mx) print mx mx = 0 0 mx c = 0 0 c S = input() input() S c = 0 0 c mx = max(mx, c) max(mx, c) mx c += 1 1 c
S = input()

mx = 0
c = 0
for si in S:
    if si == 'R':
        c += 1
        mx = max(mx, c)
    else:
        c = 0

print(mx)