#include #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; int cnt[]{ 1,0,0,0,1,0,1,0,2,1 }; int main() { string s; cin >> s; int ans = 1; for (char c : s)ans += cnt[c - '0'] + 2; cout << ans << endl; }