#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  long long n = s.size();
  long long fg = 0;
  for (long long i = n - 1; i > 0; i--) {
    if (s[i] == '1') fg = 1;
  }
  if (fg == 0)
    cout << n / 2 << "\n";
  else
    cout << ceil((long double)n / 2) << "\n";
  return 0;
}
