#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 500;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const int BASE = 31337;
map<int, int> mp;
char s[N];
int n, sol = 0;
int main() {
  scanf("%s", s);
  n = strlen(s);
  mp[0] = 1;
  for (int i = 0; i < n;) {
    int cur = 0;
    for (; i < n && mp[cur]; i++) cur = BASE * cur + s[i];
    mp[cur] = 1;
    sol++;
  }
  printf("%d\n", sol);
  return 0;
}
