fun main(args: Array<String>) {
    var s = readString()

    while (true) {
        s = s.dropLast(2)
        if (s.drop(s.length / 2) == s.dropLast(s.length / 2)) {
            println(s.length)
            return
        }
    }
}

// Tools
fun readString() = readLine()!!