fun main(args: Array<String>) {
    val S = readLine()!!
    val N = S.length

    for (i in 1..N/2-1) {
        val j = N/2-i
        if (S.substring(0, j) == S.substring(j, 2*j)) {
            println(j*2)
            return
        }
    }
}