#include <bits/stdc++.h>
using namespace std;
string second, a, b;
int main() {
  cin >> second;
  int i = 0, ans = 0;
  while (i < ((int)(second).size())) {
    b = "", b += second[i];
    ++i;
    while (i < ((int)(second).size()) && second[i] == '0') b += "0", ++i;
    if (((int)(b).size()) > ((int)(a).size()) ||
        (((int)(b).size()) == ((int)(a).size()) && a < b))
      ans = 1;
    else
      ++ans;
    a += b;
  }
  cout << ans;
}
