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