fun main(args: Array<String>) = println(run {
    val s = readLine()!!

    ((2..s.lastIndex).step(2)).map { s.dropLast(it) }
            .first { it.take(it.length/2) == it.drop(it.length/2) }.length

})
