# A
s = input()
count = 0
ans = 0
for i in range(len(s)):
    if s[i] == "R":
        count += 1
    else:
        if ans < count:
            ans = count
        count = 0
if ans < count:
    ans = count
print(ans) s = input() s input() input count = 0 count 0 ans = 0 ans 0 for i in range(len(s)):
    if s[i] == "R":
        count += 1
    else:
        if ans < count:
            ans = count
        count = 0 i range(len(s)) range len(s) len s if s[i] == "R":
        count += 1
    else:
        if ans < count:
            ans = count
        count = 0 s[i] == "R" s[i] s i "R" count += 1 count 1 if ans < count:
            ans = count
         ans < count ans count ans = count ans count count = 0 count 0 if ans < count:
    ans = count ans < count ans count ans = count ans count print(ans) print ans s = input() input() s ans = count count ans count = 0 0 count ans = 0 0 ans count += 1 1 count count = 0 0 count ans = count count ans
# A
s = input()
count = 0
ans = 0
for i in range(len(s)):
    if s[i] == "R":
        count += 1
    else:
        if ans < count:
            ans = count
        count = 0
if ans < count:
    ans = count
print(ans)
