fun main(args: Array<String>) {
    var s = readLine()!!.dropLast(2)
    while (1 < s.length) {
        val length = s.length shr 1
        val t = s.substring(0, length)
        val u = s.substring(length, s.length)
        if (t == u) {
            println(s.length)
            break
        }
        s = s.dropLast(2)
    }
}
