#include <bits/stdc++.h>
using namespace std;
const int Inf = 0x3f3f3f3f;
const double eps = 1e-8;
const int mod = 998244353;
const int maxn = 2e5 + 5;
const int N = 1e5;
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
char p[maxn];
int ans = 0;
int judge(int l, int r, int x) {
  for (int i = 0; i < x; i++) {
    if (p[i + l] > p[i + r])
      return 1;
    else if (p[i + l] < p[i + r])
      return 0;
  }
  return 1;
}
int main() {
  scanf("%s", p + 1);
  int len = strlen(p + 1);
  int l = len, r = len;
  ans = 1;
  while (1) {
    l = r;
    while (p[l] == '0' && l > 0) l--;
    if (l <= 0) break;
    if (l - 1 > r - l + 1)
      ans++;
    else if (l - 1 < r - l + 1)
      break;
    else if (judge(1, l, l - 1)) {
      ans++;
    } else {
      break;
    }
    r = l - 1;
  }
  printf("%d", ans);
  return 0;
}
