#include using namespace std; int main() { string s; cin >> s; cout << abs(8 - count(s.begin(), s.end(), '0')) << endl; return 0; }