/** * @FileName a.cpp * @Author kanpurin * @Created 2021.01.08 21:30:25 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { string s;cin >> s; if (s[0] == '1') { if (s.size()==1) { cout << 1 << endl; } else { cout << (s.size()+1)/2 << endl; } } else { cout << (s.size()+1)/2 << endl; } return 0; }