fun main(args: Array<String>) {
    val s = readLine() ?: return
    var r = s.drop(1)
    while (r.isNotEmpty()) {
        r = if (r.length % 2 == 1) {
            r.drop(1)
        } else {
            if (s.substring(0, r.length / 2) == s.substring(r.length / 2, r.length)
            ) {
                println(r.length.toString())
                return
            } else {
                r.drop(1)
            }
        }
    }
}