s = input()

if s.find('RRR') != -1:
  print(3)
elif s.find('RR') != -1:
  print(2)
elif s.find('R') != -1:
  print(1)
else:
  print(0) s = input() s input() input if s.find('RRR') != -1:
  print(3)
elif s.find('RR') != -1:
  print(2)
elif s.find('R') != -1:
  print(1)
else:
  print(0) s.find('RRR') != -1 s.find('RRR') s.find s find 'RRR' -1 print(3) print 3 elif s.find('RR') != -1:
  print(2) s.find('RR') != -1 s.find('RR') s.find s find 'RR' -1 print(2) print 2 elif s.find('R') != -1:
  print(1) s.find('R') != -1 s.find('R') s.find s find 'R' -1 print(1) print 1 print(0) print 0 s = input() input() s
s = input()

if s.find('RRR') != -1:
  print(3)
elif s.find('RR') != -1:
  print(2)
elif s.find('R') != -1:
  print(1)
else:
  print(0)