fun main(args: Array<String>) {
    abc066b()
}

fun abc066b() {
    val s = readLine()!!.let { if (it.length % 2 == 0) it else it.take(it.length - 1) }

    for (i in s.length - 2 downTo 2 step 2) {
        val tempS = s.substring(0, i)
        if (tempS.take(tempS.length / 2) == tempS.takeLast(tempS.length / 2)) return println(tempS.length)
    }
}
