#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n;
  cin >> s;
  n = s.length();
  string ssub1, ssub2;
  ssub1 = s.substr(0, 1);
  ssub2 = s.substr(1);
  if (ssub1 == ssub2) {
    cout << 0 << endl;
    return 0;
  }
  int cp = 1;
  int i, j;
  bool findFlg;
  string ssub1new, ssub2new;
  for (j = 2; j < n; j++) {
    findFlg = false;
    for (i = 1; i < n - cp; i++) {
      ssub1new = ssub2.substr(0, i);
      ssub2new = ssub2.substr(i);
      if (ssub1new != ssub1) {
        ssub1 = ssub1new;
        ssub2 = ssub2new;
        findFlg = true;
        break;
      }
    }
    if (findFlg == false) {
      if (ssub2new == ssub1new) j -= 1;
      break;
    }
    cp += i;
  }
  cout << j << endl;
  return 0;
}
