#include <bits/stdc++.h>
using namespace std;
string str;
bool compare(int x, int y, int l, int r) {
  int len = y - x + 1, siz = r - l + 1;
  if (len > siz) return true;
  if (len < siz) return false;
  for (int i = 0; i < len; ++i) {
    if (str[i + x] > str[i + l])
      return true;
    else if (str[i + x] < str[i + l])
      return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> str;
  int ans = 0, y = str.size() - 2, r = str.size() - 1;
  while (y >= 0) {
    while (y >= 0 && str[y + 1] == '0') --y;
    if (compare(0, y, y + 1, r)) {
      ++ans;
      r = y;
      --y;
    } else
      break;
  }
  cout << ++ans << endl;
  return 0;
}
