#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define all(c) ((c).begin(),(c).end()) #define rall(c) (c).rbegin(),(c).rend() #define sort(v,n) sort(v,v+n) #define vsort(v) sort(v.begin(),v.end()) #define vvsort(v) sort(v.begin(),v.end(),greater()) #define ll long long #define pb(a) push_back(a) #define fi first #define se second #define inf 999999999 using namespace std; const ll MOD = 1e9 + 7; const double PI = acos(-1.0); //---------------------------------------------------------------------------------------------// string s; int ans = 0; int solve(char a) { if (a == '0') return 3; else if (a == '1')return 2; else if (a == '2')return 2; else if (a == '3')return 2; else if (a == '4')return 3; else if (a == '5')return 2; else if (a == '6')return 3; else if (a == '7')return 2; else if (a == '8')return 4; else if (a == '9')return 3; } int main() { cin >> s; for (int i = 0; i < s.length(); i++) { ans += solve(s[i]); } ans += 1; cout << ans << endl; return 0; }