s = input()
count = 0
max = 0

for i in range(len(s)):
    if s[i] == 'S':
        count =0
    else:
        count += 1
        if count > max:
            max = count

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

for i in range(len(s)):
    if s[i] == 'S':
        count =0
    else:
        count += 1
        if count > max:
            max = count

print(max)