#include <bits/stdc++.h>
using namespace std;
string s, cur;
vector<string> v;
int l = 0, res = 1;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (i && s[i] != '0') v.push_back(cur), cur = "";
    cur.push_back(s[i]);
  }
  v.push_back(cur);
  cur = "";
  for (int i = 0; i < v.size(); i++) {
    if (v[i].size() < cur.size() || (v[i].size() == cur.size() && v[i] <= cur))
      res++;
    else
      res = 1;
    cur += v[i];
  }
  cout << res;
}
