#include <bits/stdc++.h>
using namespace std;
vector<string> V;
bool cmp(string &s1, string &s2) {
  if (s1.length() != s2.length()) return (s1.length() < s2.length());
  return (s1 + s2 < s2 + s1);
}
int main() {
  string s;
  cin >> s;
  int pos = 0;
  while (pos < (int)s.length()) {
    string tmp = "";
    tmp += s[pos];
    pos++;
    while (pos < (int)s.length() && s[pos] == '0') tmp += '0', pos++;
    V.push_back(tmp);
  }
  string now = "";
  int ans = 0;
  for (int i = 0; i < (int)V.size(); i++) {
    if (cmp(now, V[i]))
      ans = 1;
    else
      ans++;
    now = now + V[i];
  }
  cout << ans << endl;
  return 0;
}
