import re

x = input()
pattern = "R+"
pat = re.search(pattern, x)
if pat:
  print(len(pat.group()))
else:
  print(0) import re re x = input() x input() input pattern = "R+" pattern "R+" pat = re.search(pattern, x) pat re.search(pattern, x) re.search re search pattern x if pat:
  print(len(pat.group()))
else:
  print(0) pat print(len(pat.group())) print len(pat.group()) len pat.group() pat.group pat group print(0) print 0 x = input() input() x pat = re.search(pattern, x) re.search(pattern, x) pat pattern = "R+" "R+" pattern
import re

x = input()
pattern = "R+"
pat = re.search(pattern, x)
if pat:
  print(len(pat.group()))
else:
  print(0)