import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);
//aryread!string();
void main()
{
    auto s = sread();
    // writeln(s);
    // writeln(s[0 .. (s.length) / 2]);
    // writeln(s[(s.length) / 2 .. $]);
    foreach (i; 2 .. (s.length))
    {
        // writeln(s[0 .. $ - i]);
        if (func(s[0 .. $ - i]))
        {
            writeln(s[0 .. $ - i].length);
            return;
        }
    }

}

auto func(string s)
{
    if (s[0 .. (s.length) / 2] == s[(s.length) / 2 .. $])
    {
        return true;
    }
    else
    {
        return false;
    }
}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}

void arywrite(T)(T a)
{
    a.map!text.join(' ').writeln;
}
