#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e12 + 1, maxn = 2 * (1e5 + 5), mod = 1e9 + 7;
const double eps = 1e-9;
long long m, i, j, k, n, answer, t, l, r;
string s;
bool f(long long l0, long long r0, long long i0) {
  if (r0 - i0 + 1 < i0 - l0) {
    return 1;
  }
  if (r0 - i0 + 1 > i0 - l0) {
    return 0;
  }
  long long jd = 0;
  for (long long i1 = l0; i1 < i0; ++i1) {
    if (s[i1] > s[i1 + i0]) {
      jd = 1;
      break;
    }
    if (s[i1] < s[i1 + i0]) {
      if (!jd) {
        return 0;
      }
      break;
    }
  }
  if (jd) {
    return 1;
  }
}
int main() {
  cin >> s;
  n = s.size();
  l = 0;
  r = n - 1;
  for (i = n - 1; i >= 0; --i) {
    j = 0;
    while (i >= 0 && s[i] == '0') {
      j = 1;
      i--;
    }
    if (f(l, r, i)) {
      r = i - 1;
      answer++;
    } else {
      break;
    }
  }
  cout << answer + 1;
}
