s = input()

if s.count("R")==2 and s[1]=="S":
    print(s.count("R")-1)
else:
    print(s.count("R")) s = input() s input() input if s.count("R")==2 and s[1]=="S":
    print(s.count("R")-1)
else:
    print(s.count("R")) s.count("R")==2 and s[1]=="S" s.count("R")==2 s.count("R") s.count s count "R" 2 s[1]=="S" s[1] s 1 "S" print(s.count("R")-1) print s.count("R")-1 s.count("R") s.count s count "R" 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]=="S":
    print(s.count("R")-1)
else:
    print(s.count("R"))