import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

void main() {
    auto s = readln.chomp;
    do {
        s = s[0..$-2];
    } while (!zip(s[0..$/2], s[$/2..$]).all!(z => z[0] == z[1]));
    s.length.writeln;
}

