#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
	string s;
	cin >> s;
	int c = 0;
	for (int i = 2; i < s.size(); i += 2) {
		if (s.substr(0, i / 2) == s.substr(i / 2, i / 2))c = i;
	}
	cout << c << endl;
	int x;
	cin >> x;
	return 0;
}