program asakatsu318B
    implicit none
    integer(8)::i,slen,ans
    character(200)::S
    read*,S
    slen=len_trim(S)
    ans=0
    do i=1,slen/2-1
        if(S(1:i)==S(i+1:2*i))ans=max(ans,2*i)
    end do
    print'(i0)',ans
end program asakatsu318B