s=input()
n=0
m=0
for i in range(len(s)):
    if s[i]=='S':
        n=0
    else:
        n+=1
        m=n
print(m) s=input() s input() input n=0 n 0 m=0 m 0 for i in range(len(s)):
    if s[i]=='S':
        n=0
    else:
        n+=1
        m=n i range(len(s)) range len(s) len s if s[i]=='S':
        n=0
    else:
        n+=1
        m=n s[i]=='S' s[i] s i 'S' n=0 n 0 n+=1 n 1 m=n m n print(m) print m n+=1 1 n n=0 0 n m=0 0 m m=n n m n=0 0 n s=input() input() s
s=input()
n=0
m=0
for i in range(len(s)):
    if s[i]=='S':
        n=0
    else:
        n+=1
        m=n
print(m)