s = input()
res = 0
cur = 0
for i in s:
  if i =='S':
    cur = 0
  else:
    cur += 1
  res = max(cur, res)
print(res) s = input() s input() input res = 0 res 0 cur = 0 cur 0 for i in s:
  if i =='S':
    cur = 0
  else:
    cur += 1
  res = max(cur, res) i s if i =='S':
    cur = 0
  else:
    cur += 1
   i =='S' i 'S' cur = 0 cur 0 cur += 1 cur 1 res = max(cur, res) res max(cur, res) max cur res print(res) print res s = input() input() s cur = 0 0 cur cur += 1 1 cur res = max(cur, res) max(cur, res) res res = 0 0 res cur = 0 0 cur
s = input()
res = 0
cur = 0
for i in s:
  if i =='S':
    cur = 0
  else:
    cur += 1
  res = max(cur, res)
print(res)