s = input()
ans = 0
flag = 0
temp = 0
for i in range(len(s)):
    if s[i] == 'R':
        flag = 1
    else:
        flag = 0
    if flag:
        temp += 1
    else:
        temp = 0
    ans = max(ans, temp)

print(ans) s = input() s input() input ans = 0 ans 0 flag = 0 flag 0 temp = 0 temp 0 for i in range(len(s)):
    if s[i] == 'R':
        flag = 1
    else:
        flag = 0
    if flag:
        temp += 1
    else:
        temp = 0
    ans = max(ans, temp) i range(len(s)) range len(s) len s if s[i] == 'R':
        flag = 1
    else:
        flag = 0
     s[i] == 'R' s[i] s i 'R' flag = 1 flag 1 flag = 0 flag 0 if flag:
        temp += 1
    else:
        temp = 0
     flag temp += 1 temp 1 temp = 0 temp 0 ans = max(ans, temp) ans max(ans, temp) max ans temp print(ans) print ans flag = 0 0 flag temp += 1 1 temp temp = 0 0 temp ans = 0 0 ans s = input() input() s temp = 0 0 temp ans = max(ans, temp) max(ans, temp) ans flag = 0 0 flag flag = 1 1 flag
s = input()
ans = 0
flag = 0
temp = 0
for i in range(len(s)):
    if s[i] == 'R':
        flag = 1
    else:
        flag = 0
    if flag:
        temp += 1
    else:
        temp = 0
    ans = max(ans, temp)

print(ans)
