S = input()

result = 0
if "R" in S:
  if "RR" in S:
    result = S.count("R")
  else:
    result = 1

print(result) S = input() S input() input result = 0 result 0 if "R" in S:
  if "RR" in S:
    result = S.count("R")
  else:
    result = 1 "R" in S "R" S if "RR" in S:
    result = S.count("R")
  else:
    result = 1 "RR" in S "RR" S result = S.count("R") result S.count("R") S.count S count "R" result = 1 result 1 print(result) print result S = input() input() S result = S.count("R") S.count("R") result result = 1 1 result result = 0 0 result
S = input()

result = 0
if "R" in S:
  if "RR" in S:
    result = S.count("R")
  else:
    result = 1

print(result)
