#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; vector tmp; for(int i = 0; i <= s.size(); i++){ for(char c = '0'; c <= '9'; c++){ string t = s; if(i == 0 && c == '0') continue; t.insert(t.begin() + i, c); tmp.emplace_back(stoll(t)); } } sort(tmp.begin(), tmp.end()); tmp.erase(unique(tmp.begin(), tmp.end()), tmp.end()); cout << tmp.size() << '\n'; }