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