#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long c = 0;
  for (long long i = 0; i < s.length(); i++) {
    if (s[i] == '1') {
      c++;
    }
  }
  if (s == "0") {
    cout << "0";
  } else if (c == 1) {
    if (s.length() % 2 == 1) {
      cout << (s.length() - 1) / 2;
    } else {
      cout << (s.length() / 2);
    }
  } else {
    long long cnt = 0;
    for (long long i = s.length() - 1; i >= 0; i -= 2) {
      cnt++;
    }
    cout << cnt;
  }
}
