#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string str;
  cin >> str;
  bool check = true;
  int n = str.size();
  for (int i = 1; i < n; i++)
    if (str[i] != '0') check = false;
  if (!check)
    cout << (n + 1) / 2 << "\n";
  else
    cout << n / 2;
  return 0;
}
