"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    let S = arg[0].split("");
    const N = S.length;
    
    for(let i=0; i<N; i++) {
        S.pop();
        
        const first = S.slice(0, Math.ceil(S.length / 2));
        const last  = S.slice(Math.ceil(S.length / 2) * -1);
        
        // console.log(`first:${first}`);
        // console.log(`last:${last}`);
        
        if(first.join("") === last.join("") && S.length % 2 === 0) {
            console.log(S.length);
            return;
        }
    }
    
    console.log(1);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));