#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> letter[1000000];
long long len;
int main() {
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  string curr = "1";
  int ans = 0;
  while (s.length() > curr.length() ||
         (s.length() == curr.length() && s > curr)) {
    ans++, curr += "00";
  }
  cout << ans;
  return 0;
}
