s = input()

if s == "RRR":
    print("3")
elif "RR" in s:
    print("2")
elif "R" in s:
    print("1")
else:
    print("0") s = input() s input() input if s == "RRR":
    print("3")
elif "RR" in s:
    print("2")
elif "R" in s:
    print("1")
else:
    print("0") s == "RRR" s "RRR" print("3") print "3" elif "RR" in s:
    print("2") "RR" in s "RR" s print("2") print "2" elif "R" in s:
    print("1") "R" in s "R" s print("1") print "1" print("0") print "0" s = input() input() s
s = input()

if s == "RRR":
    print("3")
elif "RR" in s:
    print("2")
elif "R" in s:
    print("1")
else:
    print("0")