import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  val s = sc.next
  val n = s.length

  def loop(str: String): String ={
    val l = str.length
    if(l < n && str.substring(0,l/2) == str.substring(l/2)) str
    else loop(str.substring(0,l - 2))
  }

  val res = loop(s).length

  println(res)
}