#include<iostream>
using namespace std;
int main() {
 string S;
 cin >> S;
 int L;
 L = S.size();
 S = S.erase(L-2);
 L = S.size();
 while (S.substr(0, L/2) != S.substr(L/2)) {
  S.erase(L-2);
  L = S.size();
 }
 cout << S.size() << endl;
 return 0;
}