S = input()

a = "RRR"
b = "RR"
c = "R"
    
if a == 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 == S:
    print(3)
    
elif b in S:
    print(2)

elif c in S:
    print(1)
    
else:
    print(0) a == 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 == S:
    print(3)
    
elif b in S:
    print(2)

elif c in S:
    print(1)
    
else:
    print(0)