#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define loop(i,a,b) for(int i=a;i pii; typedef vector vi; typedef vector vvi; typedef vector vp; typedef vector vvp; typedef vector vs; typedef vector vd; typedef tuple tp; typedef vector vt; typedef vector vvd; typedef pair pip; typedef vectorvip; const double PI=acos(-1); const double EPS=1e-7; const int inf=1e8; const ll INF=1e16; int dx[]={0,1,0,-1}; int dy[]={1,0,-1,0}; int main(){ string s; cin>>s; int t=stoi(s); assert(0<=t&&t<=1000000000); int w[]={3,2,2,2,3,2,3,2,4,3}; int out=1; rep(i,s.size())out+=w[s[i]-'0']; cout<