W = input()

if W.count("R") > 0:
    if W == "RRR":
        print(3)
    elif "RR" in W:
        print(2)
    else:
        print(1)
else:
    print(0) W = input() W input() input if W.count("R") > 0:
    if W == "RRR":
        print(3)
    elif "RR" in W:
        print(2)
    else:
        print(1)
else:
    print(0) W.count("R") > 0 W.count("R") W.count W count "R" 0 if W == "RRR":
        print(3)
    elif "RR" in W:
        print(2)
    else:
        print(1) W == "RRR" W "RRR" print(3) print 3 elif "RR" in W:
        print(2)
     "RR" in W "RR" W print(2) print 2 print(1) print 1 print(0) print 0 W = input() input() W
W = input()

if W.count("R") > 0:
    if W == "RRR":
        print(3)
    elif "RR" in W:
        print(2)
    else:
        print(1)
else:
    print(0)