"use strict"

function main(input) {

    input = input.split('')
    for (let i = input.length - 2; i > 0; i--) {
        if (i % 2 == 0) {
            let a = input.slice(0, i / 2).join('')
            let b = input.slice(i / 2, i).join('')
            // console.log(a, b)
            if (a == b) {
                console.log(i)
                return
            }
        }

    }

}
main(require("fs").readFileSync("/dev/stdin", "utf8"));