import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val s = sc.next()
    for (len in s.length / 2 - 1 downTo 1) {
        val left = s.substring(0 until len)
        val right = s.substring(len until 2*len)
        if (left == right) {
            println(len*2)
            return
        }
    }
}