#include <bits/stdc++.h>
char num[100010];
bool bigger(int l, int m, int r) {
  for (int i = 1; i < r - m + 1; i++)
    if (num[l + i - 1] < num[m + i]) return false;
  return true;
}
int main() {
  scanf("%s", num + 1);
  int n = strlen(num + 1);
  int i = n;
  int j;
  int ans = 0;
  while (i >= 1) {
    j = i;
    while (num[j--] == '0' && j >= 1)
      ;
    if (j > i - j || (j == i - j && bigger(1, j, i)))
      ans++;
    else
      break;
    i = j;
  }
  printf("%d", ans + 1);
}
