#include using namespace std; int main(){ int n,ans=0; cin >> n; while(n!=0){ ans+=2; int tmp=n%10; if(tmp==0||tmp==4||tmp==6||tmp==9) ans++; if(tmp==8) ans+=2; n/=10; } cout << ans+1 << endl; return 0; }