n = input()
r = 0
Tr = 0
for i in n:
    if i == "R":
        r += 1
        Tr = r
    elif i == "S":
        r = 0
print(Tr) n = input() n input() input r = 0 r 0 Tr = 0 Tr 0 for i in n:
    if i == "R":
        r += 1
        Tr = r
    elif i == "S":
        r = 0 i n if i == "R":
        r += 1
        Tr = r
    elif i == "S":
        r = 0 i == "R" i "R" r += 1 r 1 Tr = r Tr r elif i == "S":
        r = 0 i == "S" i "S" r = 0 r 0 print(Tr) print Tr Tr = 0 0 Tr r = 0 0 r r = 0 0 r Tr = r r Tr r += 1 1 r n = input() input() n
n = input()
r = 0
Tr = 0
for i in n:
    if i == "R":
        r += 1
        Tr = r
    elif i == "S":
        r = 0
print(Tr)
