#include <bits/stdc++.h>
using namespace std;
int main() {
  char ch[1000];
  scanf("%s", ch);
  int n = strlen(ch);
  int c = 0;
  for (int i = 0; i < n; i++)
    if (ch[i] == '1') c++;
  if (c > 1)
    cout << (n + 1) / 2 << endl;
  else
    cout << n / 2 << endl;
  return 0;
}
