#include using namespace std; int main() { const int beet[] = {3, 2, 2, 2, 3, 2, 3, 2, 4, 3}; string S; cin >> S; int ret = 1; for(auto &c : S) ret += beet[c - '0']; cout << ret << endl; }