#include<iostream>
#include<cstring>
using namespace std;
char A[205];

int main()
{
cin >> A;
int b=strlen(A)-2;
while(b){
int p=1;
for(int i=0;i<b/2;i++)
{
	if(A[i]!=A[i+b/2]) p=0;
	if(p==0) break;
}
if(p==1) break;
else b=b-2;	
}
cout << b << endl;
return 0;	
}