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

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(string s) {
    int n = cast(int)s.length;
    for (int i = 1; i < n; i++) {
        if ((n - i) % 2 == 1) continue;

        int m = (n - i) / 2;
        auto a = s[0..m];
        auto b = s[m..m*2];
        if (a == b) {
            return m * 2;
        }
    }
    assert(false);
}

void main() {
    string s = read!string;
    writeln(calc(s));
}
