n = input()

rcount = 0
m = 0
for i in n:
  if i == "R":
    rcount += 1
  else:
    rcount = 0
  
  if m <= rcount:
    m = rcount
print(m) n = input() n input() input rcount = 0 rcount 0 m = 0 m 0 for i in n:
  if i == "R":
    rcount += 1
  else:
    rcount = 0
  
  if m <= rcount:
    m = rcount i n if i == "R":
    rcount += 1
  else:
    rcount = 0
  
   i == "R" i "R" rcount += 1 rcount 1 rcount = 0 rcount 0 if m <= rcount:
    m = rcount m <= rcount m rcount m = rcount m rcount print(m) print m n = input() input() n rcount = 0 0 rcount rcount += 1 1 rcount rcount = 0 0 rcount m = 0 0 m m = rcount rcount m
n = input()

rcount = 0
m = 0
for i in n:
  if i == "R":
    rcount += 1
  else:
    rcount = 0
  
  if m <= rcount:
    m = rcount
print(m)