s=input()

a="RRR"
b="RR"
c="R"


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

a="RRR"
b="RR"
c="R"


if a in s:
    print(3)
elif b in s:
    print(2)
elif c in s:
    print(1)
else:
    print(0)