#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int main() {
  char s[110];
  cin >> s;
  int len = strlen(s);
  int flag = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == '1') flag++;
  }
  int tmp = len - 1;
  int ans;
  if (tmp % 2 == 0) {
    ans = tmp / 2;
    if (flag > 1) ans++;
  } else {
    ans = tmp / 2 + 1;
  }
  cout << ans << endl;
  return 0;
}
