S = str(input())
count = 0
result = 0
for i in S:
    if i == 'R':
        count += 1
        if count > result:
            result = count
    else:
        count = 0
print(result)

87b91c5e5562e03159908f9c34f486924fc974e1
<mask token>

<mask token>
for i in S:
    if i == 'R':
        count += 1
        if count > result:
            result = count
    else:
        count = 0
print(result)

S = str(input())
count = 0
result = 0
for i in S:
    if i == 'R':
        count += 1
        if count > result:
            result = count
    else:
        count = 0
print(result)
