c = input()

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

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