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

bool check(string s) {
  if (s.length % 2) { return false; }
  string a = s[0..$/2],
         b = s[$/2..$];
  return a == b;
}

void main() {
  string s = readln.chomp;

  size_t del = 1;

  while (del < s.length - 1) {
    if (check(s[0..$-del])) {
      break;
    } else {
      del++;
    }
  }

  writeln(s[0..$-del].length);
}
