#include <bits/stdc++.h>
using namespace std;
long long n, m, a, b, c, ans, f, l, r;
char d;
int main() {
  string s;
  cin >> s;
  if (s.length() % 2 == 0)
    c = (s.length()) / 2;
  else {
    c = (s.length() - 1) / 2;
    for (int i = 1; i < s.length(); ++i) {
      if (s[i] == '1') {
        c++;
        break;
      }
    }
  }
  cout << c;
}
