program ABC175A
    implicit none
    character(3)S
    read*,S
    if(S=="RRR")then
        print'(i0)',3
    else if(S=="SRR".or.S=="RRS")then
        print'(i0)',2
    else if(S=="SSS")then
        print'(i0)',0
    else
        print'(i0)',1
    end if
end program ABC175A