main=getLine>>=print.(\s->f (length s) s)
 where f n s = if(mod n 2)==0 then(g(n-2)(init(init s)))else(g(n-1)(init s))
       g n s = if((take(quot n 2)s)++(take(quot n 2)s))==s then n else (g(n-2)(init(init s)))