#include <bits/stdc++.h>
using namespace std;
bool greaterz(string a, string b) {
  if (a.length() > b.length())
    return true;
  else if (a.length() < b.length())
    return false;
  else {
    int carry = 0;
    for (int i = a.length() - 1; i >= 0; i--) {
      if (a[i] - '0' + carry - (b[i] - '0') < 0) {
        carry = -1;
      }
    }
    if (carry < 0) return false;
    return true;
  }
}
int main() {
  string s;
  cin >> s;
  int r = s.length() - 1;
  int nums = 1;
  int t = 1;
  while (r != 0) {
    if (s[r] == '0') {
      r--;
      t++;
      continue;
    }
    if (greaterz(s.substr(0, r), s.substr(r, t))) {
      nums++;
      r--;
      t = 1;
    } else
      break;
  }
  cout << nums << endl;
  return 0;
}
