#include <bits/stdc++.h>
char p[100000];
int main() {
  gets(p);
  int n = strlen(p);
  int j = n;
  int result = 1;
  for (int i = n - 1; i >= 0; i--) {
    if (p[i] == '0') {
      continue;
    }
    if (j < 2 * i) {
      j = i;
      result++;
    } else if (j == 2 * i) {
      if (strncmp(p, p + i, i) < 0) {
        break;
      } else {
        j = i;
        result++;
      }
    } else {
      break;
    }
  }
  printf("%d", result);
  return 0;
}
