#include <bits/stdc++.h>
using namespace std;
string s;
bool operator<(string a, string b) {
  int lena = a.length();
  int lenb = b.length();
  if (lena < lenb)
    return true;
  else if (lena > lenb)
    return false;
  for (int i = 0; i <= lena; ++i) {
    if (a[i] < b[i])
      return true;
    else if (a[i] > b[i])
      return false;
  }
  return false;
}
int main() {
  while (cin >> s) {
    string base = "1";
    int ans = 0;
    while (base.length() <= 100) {
      if (base < s) {
        ans++;
      } else
        break;
      base += "00";
    }
    cout << ans << endl;
  }
  return 0;
}
