#include using namespace std; using ll = long long; constexpr char newl = '\n'; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string s; cin >> s; int ans = 0; for (int i = 0; i + 1 < s.size(); i++) { if (s[0] != '0' && s[i + 1] != '0') ++ans; } cout << ans << newl; return 0; }