#include <bits/stdc++.h>
using namespace std;
const double eps(1e-8);
char s[100010];
bool compare(int s1, int e1, int s2, int e2) {
  int len1 = e1 - s1 + 1;
  int len2 = e2 - s2 + 1;
  if (len2 < len1) return true;
  if (len2 > len1) return false;
  for (int i = 0; i < len1; i++)
    if (s[s1 + i] > s[s2 + i])
      return true;
    else if (s[s1 + i] < s[s2 + i])
      return false;
  return true;
}
int main() {
  int pos = 0;
  scanf("%s", s);
  int n = strlen(s);
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  int end2 = n - 1;
  int end1 = n - 2;
  while (end2 >= 0) {
    while (end1 >= 0 &&
           (s[end1 + 1] == '0' || !compare(0, end1, end1 + 1, end2)))
      end1--;
    if (end1 == -1) break;
    pos++;
    end2 = end1;
    end1--;
  }
  pos++;
  cout << pos << endl;
  return 0;
}
