a = input()

if a == "RSR":
    print(1)
else :
    print(a.count("R")) a = input() a input() input if a == "RSR":
    print(1)
else :
    print(a.count("R")) a == "RSR" a "RSR" print(1) print 1 print(a.count("R")) print a.count("R") a.count a count "R" a = input() input() a
a = input()

if a == "RSR":
    print(1)
else :
    print(a.count("R"))
