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