Array.zeros = (n) => { return Array.apply(null, Array(n)).map( ()=>0 ) }
Array.prototype.max = function() { return Math.max.apply(null, this) }
Array.prototype.min = function() { return Math.min.apply(null, this) }
Array.prototype.non0length = function() { return this.reduce( (pre, current) => pre + (current != 0) ) }
var num = (val) => Array.isArray(val) ? val.map( (v)=>Number(v) ) : Number(val)
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)) {
				print(s.length)
				return;
			}
		}

	}
}


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