#include using namespace std; int main(){ int n,ans = 1; int count[10] = {3,2,2,2,3,2,3,2,4,3}; cin >> n; if(n==0) ans += count[0]; while(n > 0){ ans += count[n % 10]; n /= 10; } cout << ans << endl; return 0; }