#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int x = 0, s, y, z;
  string str, str1, str2;
  cin >> str;
  if (str.size() == 1) {
    cout << 1 << "\n";
    return 0;
  }
  str1 = "";
  if (str[1] == '0') {
    str1 += str[0];
    s = 1;
    while (str[s] == '0' && s < str.size()) {
      str1 += str[s];
      s++;
    }
    x = 1;
    for (int i = s; i < str.size(); i++) {
      if (i < (str.size() - 1)) {
        if (str[i + 1] == '0') {
          str2 = "";
          str2 += str[i];
          for (y = i + 1; str[y] == '0' && y < str.size(); y++) str2 += str[y];
          z = y;
          if (str2.size() > str1.size())
            x = 1;
          else if (str2.size() == str1.size()) {
            y = 0;
            for (int i = 0; i < str2.size() && !y; i++)
              if (str2[i] > str1[i]) y = 1;
            if (y)
              x = 1;
            else
              x++;
          } else
            x++;
          str1 += str2;
          i = z - 1;
        } else {
          str1 += str[i];
          x++;
        }
      } else {
        if (str1.size() > 1) {
          str1 += str[i];
          x++;
        } else {
          if (str1[0] < str[1])
            x = 1;
          else {
            str1 += str[i];
            x++;
          }
        }
      }
    }
  } else {
    x = 1;
    str1 += str[0];
    for (int i = 1; i < str.size(); i++) {
      if (i < (str.size() - 1)) {
        if (str[i + 1] == '0') {
          str2 = "";
          str2 += str[i];
          for (y = i + 1; str[y] == '0' && y < str.size(); y++) str2 += str[y];
          z = y;
          if (str2.size() > str1.size())
            x = 1;
          else if (str2.size() == str1.size()) {
            y = 0;
            for (int i = 0; i < str1.size() && !y; i++)
              if (str2[i] > str1[i]) y = 1;
            if (y)
              x = 1;
            else
              x++;
          } else
            x++;
          str1 += str2;
          i = z - 1;
        } else {
          if (i != 1) {
            str1 += str[i];
            x++;
          } else {
            if (str1[0] < str[1])
              x = 1;
            else
              x = 2;
            str1 += str[i];
          }
        }
      } else {
        if (str1.size() > 1) {
          str1 += str[i];
          x++;
        } else {
          if (str1[0] < str[1])
            x = 1;
          else {
            str1 += str[i];
            x++;
          }
        }
      }
    }
  }
  cout << x << "\n";
  return 0;
}
