S=input()
m=0
b=0
for s in S:
  if s == 'R':
    b+=1
    m=max(m,b)
  else:
    b=0
print(m) S=input() S input() input m=0 m 0 b=0 b 0 for s in S:
  if s == 'R':
    b+=1
    m=max(m,b)
  else:
    b=0 s S if s == 'R':
    b+=1
    m=max(m,b)
  else:
    b=0 s == 'R' s 'R' b+=1 b 1 m=max(m,b) m max(m,b) max m b b=0 b 0 print(m) print m m=0 0 m b+=1 1 b b=0 0 b S=input() input() S m=max(m,b) max(m,b) m b=0 0 b
S=input()
m=0
b=0
for s in S:
  if s == 'R':
    b+=1
    m=max(m,b)
  else:
    b=0
print(m)