#include #include using namespace std; char s[11]; void rezolva() { long long sol = 0; s[9] = 'a'; for (char i = '0'; i <= '9'; i++) { //cout << i << '\n'; sol++; for (int j = 2; j < 9; j++) { if (s[j] != i) sol++; //cout << s[j] << ' ' << sol << endl; } } cout << sol; } int main() { cin >> s; rezolva(); }