#include <bits/stdc++.h>
char str[100010];
int main() {
  int n, i = 1, ans = 1, j, len;
  scanf("%s", str);
  len = strlen(str);
  while (i < len && str[i] == '0') i++;
  for (; i < len; i++) {
    j = i;
    while (j + 1 < len && str[j + 1] == '0') j++;
    if (i > j - i + 1)
      ans++;
    else if (i == j - i + 1) {
      if (str[0] >= str[i])
        ans++;
      else
        ans = 1;
    } else
      ans = 1;
    i = j;
  }
  printf("%d", ans);
  return 0;
}
