#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 #define int long long using namespace std; typedef long long ll; const int INF = 1e9; signed main() { map ma; ma['0'] = ma['4'] = ma['6'] = ma['9'] = 3; ma['1'] = ma['2'] = ma['3'] = ma['5'] = ma['7'] = 1; ma['8'] = 4; string n; cin >> n; int ans = 0; REP(i,n.length()) { ans += ma[n[i]]; } cout << ans + 1 << endl; }