#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  int i, j, k;
  string s;
  cin >> s;
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '1') k++;
  }
  if (k > 1)
    cout << (s.length() + 1) / 2;
  else
    cout << (s.length()) / 2;
  return 0;
}
