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;
    assert(n % 2 == 0);

    // 末尾から i 文字分だけ削る
    for (int i = 1; i < n; i++) {
        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));
}
