program kadai
    implicit none
    character(len=100001) ::  S
    integer  ::  flag(100001)
    integer  ::  e,l,i,j
    integer  ::  left,med
integer,allocatable  ::  lefflag(:)
    integer  ::  right
    integer,allocatable  ::  ans(:)

    read(*,*) S

    flag=0
    i=1
    e=len_trim(S)
    do i=1,e
        if (S(i:i)=="R") then
            flag(i)=1
        end if
            if (S(i:i)=="L") then
            flag(i)=2
        end if
        if (S(i:i)=="0") then
            e=i
            exit
        end if
    end do

    allocate(ans(e))
    allocate(lefflag(e))

    left=1
    right=0
    lefflag=0
    ans=0
    do i=1,e
        if (flag(i)==2 .and. i>right) then
            if (flag(i+1)==1 .or. i==e) then
                right=i
                l=mod(right-left,2)
                if (l==0) then
                    ans(right)=ans(right)+(right-left+2)/2
                    ans(right-1)=ans(right-1)+(right-left)/2
                end if
                if (l==1) then
                    ans(right)=ans(right)+(right-left+1)/2
                    ans(right-1)=ans(right-1)+(right-left+1)/2
                end if
                left=right+1
            end if
            if (flag(i+1)==2) then
                med=i
                do j=med,e
                    if (j==e) then
                        right=j
                        exit
                    end if
                    if (flag(j)==1) then
                        right=j-1
                        exit
                    end if
                end do
                l=mod(med-left,2)
                if (l==0) then
                    ans(med)=ans(med)+(med-left+2)/2
                    ans(med-1)=ans(med-1)+(med-left)/2
                end if
                if (l==1) then
                    ans(med)=ans(med)+(med-left+1)/2
                    ans(med-1)=ans(med-1)+(med-left+1)/2
                end if

                l=mod(right-med,2)
                if (l==0) then
                    ans(med-1)=ans(med-1)+(right-med)/2
                    ans(med)=ans(med)+(right-med+2)/2-1
                end if
                if (l==1) then
                    ans(med-1)=ans(med-1)+(right-med+1)/2
                    ans(med)=ans(med)+(right-med+1)/2-1
                end if
            end if
        left=right+1
        end if
    end do

write(*,*) ans


stop
contains

end program kadai
