#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s, tmp1, tmp2;
  cin >> s;
  long long ans = 0;
  long long i = 0;
  while (i <= s.size()) {
    tmp1.push_back(s[i]);
    for (int j = i + 1; j < s.size(); j++) {
      tmp2.push_back(s[j]);
      if (tmp1 != tmp2) {
        ans += 1;
        i += tmp2.size();
        tmp2.clear();
        break;
      }
    }
    i += tmp1.size();
    tmp1.clear();
  }
  cout << ans * 2 << endl;
  return 0;
}
