#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int main() {
  string a;
  int ans = 1, n;
  cin >> a;
  n = a.size();
  for (int i = a.size() - 1; i >= 0; i--) {
    if (a[i] != '0') {
      if (2 * i < n or (2 * i == n and a[0] < a[i]))
        break;
      else {
        ans++;
        n = i;
      }
    }
  }
  cout << ans << endl;
}
