A.cpp 300 B

12345678910111213141516
  1. using namespace std;
  2. #include<bits/stdc++.h>
  3. int main() {
  4. int CC[] = {1, 0, 0, 0, 0, 0, 1, 0, 2, 1,};
  5. string s;
  6. while (cin >> s) {
  7. int tot = 0;
  8. for (size_t i = 0; i < s.length(); i++)
  9. tot += CC[s[i] - '0'];
  10. cout << tot << endl;
  11. }
  12. return 0;
  13. }