#include using namespace std; string S; set s; int main() { // freopen("date.in", "r", stdin); // freopen("date.out","w", stdout); cin.sync_with_stdio(false); cin >> S; for (int i = 1; i < 9; i++) { for (char c = '0'; c <= '9'; c++) { string ns = S.substr(0, i + 1) + c + S.substr(i + 1); s.insert(ns); } } cout << (int) s.size() << endl; return 0; }