s = input()

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