w = input()

if w.count("R") == 2:
    if w[1] == "R":
        print(2)
    else:
        print(1)

else:
    print(w.count("R")) w = input() w input() input if w.count("R") == 2:
    if w[1] == "R":
        print(2)
    else:
        print(1)

else:
    print(w.count("R")) w.count("R") == 2 w.count("R") w.count w count "R" 2 if w[1] == "R":
        print(2)
    else:
        print(1) w[1] == "R" w[1] w 1 "R" print(2) print 2 print(1) print 1 print(w.count("R")) print w.count("R") w.count w count "R" w = input() input() w
w = input()

if w.count("R") == 2:
    if w[1] == "R":
        print(2)
    else:
        print(1)

else:
    print(w.count("R"))