#include using namespace std; using i64 = int64_t; int main() { cin.tie(nullptr)->sync_with_stdio(false); cout << fixed << setprecision(20); int t = 1; for (int ti = 0; ti < t; ti += 1) { int n; cin >> n; auto s = to_string(n); set ss; for (char c = '0'; c <= '9'; c += 1) { for (int i = 0; i <= ssize(s); i += 1) { if (not i and c == '0') { continue; } auto t = s; t.insert(t.begin() + i, c); ss.insert(t); } } cout << ss.size() << "\n"; } }