s = input().split('S')
m = 0
for i in s:
  if len(i) > m:
    m = len(i)
print(m) s = input().split('S') s input().split('S') ().split () input split 'S' m = 0 m 0 for i in s:
  if len(i) > m:
    m = len(i) i s if len(i) > m:
    m = len(i) len(i) > m len(i) len i m m = len(i) m len(i) len i print(m) print m m = 0 0 m s = input().split('S') input().split('S') s m = len(i) len(i) m
s = input().split('S')
m = 0
for i in s:
  if len(i) > m:
    m = len(i)
print(m)
