import io.StdIn.readLine
object Main extends App {
  val s = readLine
  assert(isEvenString(s))
  println(solve(s.dropRight(2)))

  def solve(s: String): Int = {
    if (s.isEmpty) 0
    else if (isEvenString(s)) s.length
    else solve(s.dropRight(2))
  }
  
  def isEvenString(s: String) = {
    if (s.length % 2 != 0) false
    else (s.dropRight(s.length / 2) == s.drop(s.length / 2))
  }
}
