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