#include using namespace std; int res; const int N = 110; int a[N]; //判断是不是数位递增数 bool judge(int x) { string s = to_string(x); for (int i = 0; i < s.size() - 1; i++) if (s[i] > s[i + 1]) return false; return true; } int main() { int n; cin >> n; for (int i = 10; i <= n; i++) if (judge(i)) res++; printf("%d", res); return 0; }