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"))