#include <bits/stdc++.h>
#pragma GCC optimize("O3,no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
using namespace std;
using Graph = vector<vector<int64_t>>;
const long double pi = M_PI;
const int64_t MOD = 999999999999971;
const int64_t INF = 1LL << 61;
int64_t Floor(int64_t a, int64_t b) { return (a - (a % b)) / b; }
int64_t Ceil(int64_t a, int64_t b) {
  if (a % b == 0) {
    return a / b;
  } else {
    return Floor(a, b) + 1;
  }
}
int64_t digits(int64_t n) { return (int64_t)to_string(n).size(); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  set<string> se;
  int n = s.size();
  for (int i = 0; i < n;) {
    string a;
    do {
      a += s[i];
      i++;
    } while (se.count(a) == 1 && i < n);
    se.insert(a);
  }
  cout << se.size() << endl;
  return 0;
}
