S=list(input())
count=S.count("R")
if S==["R","S","R"]:
  count=1
print(count) S=list(input()) S list(input()) list input() input count=S.count("R") count S.count("R") S.count S count "R" if S==["R","S","R"]:
  count=1 S==["R","S","R"] S ["R","S","R"] "R" "S" "R" count=1 count 1 print(count) print count count=S.count("R") S.count("R") count S=list(input()) list(input()) S count=1 1 count
S=list(input())
count=S.count("R")
if S==["R","S","R"]:
  count=1
print(count)