S = input()
if S == 'RRR':
  print(3)
elif 'RR' in S:
  print(2)
elif 'R' in S:
  print(1)
else:
  print(0) S = input() S input() input if S == 'RRR':
  print(3)
elif 'RR' in S:
  print(2)
elif 'R' in S:
  print(1)
else:
  print(0) S == 'RRR' S 'RRR' 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 S == 'RRR':
  print(3)
elif 'RR' in S:
  print(2)
elif 'R' in S:
  print(1)
else:
  print(0)