import scala.io.StdIn

import scala.annotation.tailrec

object Main extends App {
  val s = StdIn.readLine

  def check(str:String):Boolean = {
    val len = str.length
    if((len&1) == 0) str.substring(0,len/2) == str.substring(len/2)
    else false
  }

  @tailrec
  def rec(cnt:Int, ss:String):Int = {
    if(check(ss)) cnt
    else rec(cnt-1,ss.init)
  }

  val ans = rec(s.length-1,s.init)
  println(ans)
}