#include <bits/stdc++.h>
using namespace std;
string s;
int ans = 1, n;
int main() {
  cin >> s;
  n = s.size();
  for (int i = n - 1; i >= 0; i--)
    if (s[i] != '0') {
      if (i * 2 < n || (i * 2 == n && s[i] > s[0])) break;
      ans++;
      n = i;
    }
  cout << ans;
}
