#include using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); string n; cin>>n; int cnt=1; for(auto&&i:n){ if(i=='8')cnt+=2; else if(i=='0'||i=='4'||i=='6'||i=='9')cnt+=1; } cout<