#include using namespace std; using ll = long long; int main() { string n; cin >> n; int count=0; for (int i = 0;i < n.size();i++) { if (n[i] == '0' || n[i] == '4' || n[i] == '6' || n[i] == '9') { count += 3; } else if (n[i] == '8') { count += 4; } else { count += 2; } } count++; cout << count << endl; return 0; }