#include "bits/stdc++.h" using namespace std; #define print(x) cout< PI; typedef pair V; typedef vector VE; const ll mod = 1000000007; //10^9+7 int main(){ string s; cin>>s; int count = 0; REP(i, s.size()){ char c = s[i]; if(c == '0'){ count++; } } print(abs(count - 8)); }