#include <bits/stdc++.h>
using namespace std;
inline string GetString() {
  char S[1000005];
  scanf("%s", S);
  string ret = S;
  return ret;
}
template <typename t>
t getnum() {
  t res = 0;
  char c;
  int sign = 1;
  while (1) {
    c = getchar();
    if (c == ' ' || c == '\n')
      continue;
    else
      break;
  }
  if (c == '+') {
  } else if (c == '-')
    sign = -1;
  else
    res = c - '0';
  while (1) {
    c = getchar();
    if (c >= '0' && c <= '9')
      res = res * 10 + c - '0';
    else
      break;
  }
  return res * sign;
}
int main(int argc, char** argv) {
  string s = GetString();
  vector<string> v;
  int i = 0;
  while (i < s.length()) {
    string lala = "";
    lala += s[i];
    if (i == s.length()) break;
    while (s[i + 1] == '0') {
      lala += '0';
      i++;
      if (i == s.length() - 1) break;
    }
    v.push_back(lala);
    i++;
  }
  int ans = 1;
  string lala;
  lala = v[0];
  for (int i = 1; i < v.size(); i++) {
    if (lala.length() > v[i].length() ||
        (lala.length() == v[i].length() && lala >= v[i])) {
      ans++;
      lala += v[i];
    } else {
      ans = 1;
      lala += v[i];
    }
  }
  printf("%d\n", ans);
  return 0;
}
