import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val s = sc.next().toCharArray
    
    val l = s.length
    
    for (i <- 1 to l) {
      val ss = s.take(l - i)
      val ll = ss.length
      if (ss.take(ll / 2) sameElements ss.drop(ll / 2)) {
        println(ll)
        sys.exit(0)
      }
    }
  }
}