#include "bits/stdc++.h" using namespace std; #define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++) #define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--) #define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end()) #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFL 0x3f3f3f3f3f3f3f3fLL typedef long long ll; int main() { string s; cin >> s; int ans = 1; REP(i,s.size()) { char t = s[i] - '0'; if(t==1||t==2||t==3||t==5||t==7) ans += 2; if(t==0||t==4||t==6||t==9) ans += 3; if(t==8) ans += 4; } cout << ans << endl; return 0; }