#include <bits/stdc++.h>
using namespace std;
string a;
int answer = 1, sz = -1;
vector<pair<int, int> > Pos;
bool COMPARE(int s1, int e1, int s2, int e2) {
  if (e1 - s1 > e2 - s2)
    return 1;
  else if (e1 - s1 < e2 - s2)
    return 0;
  for (int i = s1, j = s2; i <= e1 && j <= e2; i++, j++) {
    if (a[i] == a[j])
      ;
    else if (a[i] > a[j])
      return 1;
    else
      return 0;
  }
}
int main() {
  cin >> a;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] != '0') {
      Pos.push_back(make_pair(i, i));
      sz++;
    } else {
      Pos[sz].second++;
    }
  }
  for (int i = 0; i < sz; i++) {
    if (COMPARE(Pos[i].first, Pos[i].second, Pos[i + 1].first,
                Pos[i + 1].second)) {
      answer++;
    } else {
      answer = 1;
    }
    Pos[i + 1].first = Pos[i].first;
  }
  cout << answer;
  return 0;
}
