"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const S = arg[0].split("");
    
    for(let i=0; i<S.length; i++) {
        S.pop();
        
        if(i % 2 === 0) {
            continue;
        }
        
        let mid = S.length / 2;
        
        if(S.slice(0, mid).join("") === S.slice(mid).join("")) {
            console.log(S.length);
            return;
        }
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));