#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int64_t N; cin >> N; auto f = [](int64_t x) { int res = 0; while (x > 0) { if (x % 10 == 0) res++; x /= 10; } return res; }; cout << abs(f(N) - f(1000000007)) << '\n'; return 0; }