#include "bits/stdc++.h" using namespace std; typedef long long ll; void Say(bool say, string a = "Yes", string b = "No"){cout << (say ? a : b) << endl;}; int main(){ string s; cin >> s; cout << abs(8 - count(s.begin(), s.end(), '0')) << endl; return 0; }