program A175
    implicit none
    character(3) :: S
    integer(8) :: i, d
    integer(8), dimension(:) :: ans(3)

    read(5,*) S

    d = 0
    ans = 0
    do i = 1, 3
        if (S(i:i) == "R") then
            d = d + 1
            ans(i) = d
        else
            d = 0
            ans(i) = d

        end if
    end do

    write(6,*) maxval(ans)
    



end program A175
