s = input()
if s.count('R')==2 and s[1]!='R':
  print(1)
else:
  print(s.count('R')) s = input() s input() input if s.count('R')==2 and s[1]!='R':
  print(1)
else:
  print(s.count('R')) s.count('R')==2 and s[1]!='R' s.count('R')==2 s.count('R') s.count s count 'R' 2 s[1]!='R' s[1] s 1 'R' print(1) print 1 print(s.count('R')) print s.count('R') s.count s count 'R' s = input() input() s
s = input()
if s.count('R')==2 and s[1]!='R':
  print(1)
else:
  print(s.count('R'))