#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5, M = 2e4 + 5, inf = 0x3f3f3f3f, mod = 1e9 + 7;
int main() {
  string a;
  cin >> a;
  int n = a.size(), ans = 0;
  string y;
  for (int i = n - 1; ~i; i--) {
    if (a[i] != '0') {
      if (i > 1 || (i == 1 && a[0] >= a[1])) ans++;
    } else {
      int len = 0;
      while (a[i] == '0') i--, len++;
      len++;
      if (i > len)
        ans++;
      else if (i == len) {
        int ok = 1;
        for (int j = 0; j < i; j++)
          if (a[j] < a[j + i]) {
            ok = 0;
            break;
          }
        if (ok)
          ans++;
        else
          break;
      } else
        break;
    }
  }
  ans++;
  printf("%d\n", ans);
  return 0;
}
