'use strict'

function main(s) {

  const n = s.split('\n')[0];

  let ans = 0;

  for (let i = 1; i <= (n.length / 2 - 1); i++) {
    const sliced = n.slice(0, -2 * i);
    const len = sliced.length;

    const head = sliced.slice(0, len / 2);
    const rest = sliced.slice(len / 2);

    if (head === rest) {
      ans = len;
      break;
    }
  }

  console.log(ans);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
