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

void main() {
  auto inp = readln().chomp;
  int max;
  for(int i; i<=(inp.length-1)/2; i++){
    if(inp[0..i]==inp[i..i*2]){max=i*2;}
  }
  max.writeln;
}