object Main {
  def main(args: Array[String]) {
    val sc = new java.util.Scanner(System.in)
    val base = sc.next()
    val baseLen = base.length

    def iter(s: String): Int = {
      if (s.length <= 1) {
        return baseLen
      }
      val subString = s.substring(s.length/2, s.length)
      if (subString*2 == base) {
        return s.length / 2
      }
      iter(s.substring(0, s.length-1))
    }

    println(iter(base))
  }
}

