function Main(input) {
    input = input.split("\n");
    var line = input[0].split(" ");
    var moji = line[0];
    if(moji.length%2===1){
        moji = moji.slice(0, -1);
    }
    
    while(1){
        moji = moji.slice(0, -2);
        var temp = moji.length;
        if(moji.substr(0,temp/2) === moji.substr(temp/2,temp)){
            break;
        }

        
    }
    
    console.log(moji.length);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));