#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using _loop_int = int;
const ll MOD = 1000000007ll;
int N;
int i, j, len;
char S[200000];
map<string, int> M;
int ans = 0;
void vvv(int it, string pre, string v, vector<string> vec) {
  if (pre != v) {
    ans++;
    if (it + 1 < len) {
      vvv(it + 1, v, vec[it + 1], vec);
    }
  } else {
    if (it + 1 < len) {
      vvv(it + 1, pre, v + vec[it + 1], vec);
    } else {
    }
  }
}
int main() {
  scanf("%s", S);
  string SS(S);
  len = (int)(SS.length());
  vector<string> vec;
  for (_loop_int i = 0; i < (_loop_int)(len); i++) {
    vec.push_back({SS.at(i)});
  }
  vvv(0, "", vec[0], vec);
  printf("%d", ans);
  return 0;
}
