var print = console.log

if (require('os').type() != "Darwin") {
	Main(require("fs").readFileSync("/dev/stdin", "utf8"));
	return;
}

function Main(s, l) {

	while(l = s.length) {

		s = s.slice(0, -1)
		l--

		if(l%2 == 0) {
			if(s.slice(0, l/2) == s.slice(l/2))
				return print(s.length);
		}

	}
}


Main(`abaababaab`)
Main(`xxxx`)
Main(`abcabcabcabc`)
Main(`akasakaakasakasakaakas`)