s = input()
n = ans = 0
for c in s:
    if c == "S":
        n = 0
        continue
    n += 1
    if n > ans:
        ans = n
print(ans) s = input() s input() input n = ans = 0 n 0 = ans = 0 ans 0 for c in s:
    if c == "S":
        n = 0
        continue
    n += 1
    if n > ans:
        ans = n c s if c == "S":
        n = 0
        continue
     c == "S" c "S" n = 0 n 0 continue n += 1 n 1 if n > ans:
        ans = n n > ans n ans ans = n ans n print(ans) print ans ans = n n ans ans = 0 0 ans n += 1 1 n s = input() input() s n = 0 0 n n = ans = 0 0 n
s = input()
n = ans = 0
for c in s:
    if c == "S":
        n = 0
        continue
    n += 1
    if n > ans:
        ans = n
print(ans)