#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, ans;
  string s;
  cin >> s;
  x = s.size();
  for (int i = 1; i < x; i++) {
    if (s[i] == '1') {
      x++;
      break;
    }
  }
  cout << x / 2 << endl;
  return 0;
}
