s = input()
count = 0
result = 0
for c in s:
    if c == 'R':
        count+=1
        result = max(count, result)
    else:
        count = 0

print(result) s = input() s input() input count = 0 count 0 result = 0 result 0 for c in s:
    if c == 'R':
        count+=1
        result = max(count, result)
    else:
        count = 0 c s if c == 'R':
        count+=1
        result = max(count, result)
    else:
        count = 0 c == 'R' c 'R' count+=1 count 1 result = max(count, result) result max(count, result) max count result count = 0 count 0 print(result) print result s = input() input() s result = 0 0 result count+=1 1 count count = 0 0 count result = max(count, result) max(count, result) result count = 0 0 count
s = input()
count = 0
result = 0
for c in s:
    if c == 'R':
        count+=1
        result = max(count, result)
    else:
        count = 0

print(result)