#include #include using namespace std; int main() { int hall[] = {1, 0, 0, 0, 0, 0, 1, 0, 2, 1}; string s; cin >> s; long cnt = 1; for (long i = 0; i < s.size(); i++) { cnt += 2; cnt += hall[s[i] - '0']; } cout << cnt << endl; return 0; }