import java.io.PrintWriter
val pw = PrintWriter(System.out)

fun main(args : Array<String>) {
    func()
    pw.flush()
}

fun func() {
    var ss = next()

    while (true) {
        ss = ss.slice(0..ss.length-3)
        if (ss.slice(0 until ss.length/2) == ss.substring(ss.length/2)) {
            println(ss.length)
            break
        }
    }
}

fun next() = readLine()!!

fun println(value : Any) {
    pw.println(value)
}