S=input()
if "RRR" in S:
  print(3)
elif "RR" in S:
  print(2)
elif "R" in S:
  print(1)
else:
  print(0) S=input() S input() input if "RRR" in S:
  print(3)
elif "RR" in S:
  print(2)
elif "R" in S:
  print(1)
else:
  print(0) "RRR" in S "RRR" S print(3) print 3 elif "RR" in S:
  print(2) "RR" in S "RR" S print(2) print 2 elif "R" in S:
  print(1) "R" in S "R" S print(1) print 1 print(0) print 0 S=input() input() S
S=input()
if "RRR" in S:
  print(3)
elif "RR" in S:
  print(2)
elif "R" in S:
  print(1)
else:
  print(0)