s=io.read()
function check(i)
  if (#s - i) % 2 == 0 then
    l=#s - i
    m=l//2
    a=s:sub(1,m)
    b=s:sub(m+1,#s-i)
    return a==b
  else
    return false
  end
end
for i=1,#s-2 do
  if check(i) then
    print(#s-i)
    return
  end
end