#include #define REP(i,n,N) for(int i=(n);i<(int)N;i++) #define p(s) cout<<(s)< m; string s; cin>>s; int ans=1; REP(i,0,s.size()){ char c=s[i]; if(c=='0'||c=='4'||c=='6'||c=='9'){ ans+=3; }else if(c=='8'){ ans+=4; }else{ ans+=2; } } p(ans); return 0; }