#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
string s;
int main() {
  cin >> s;
  int i = 1;
  int n = s.length();
  int fffff = 1;
  int aa = 0;
  for (int i = 1; i < n; i++) {
    if (s[i] != '0') {
      fffff = 0;
    }
  }
  while (i <= n) {
    aa++;
    i += 2;
  }
  if (fffff == 1 && n % 2) aa--;
  cout << aa << endl;
}
