long long f(long long n) { int k; long long e, r, m;
if (n <= 1) return n;
for (k = 0, e = 1, m = n; m >= 10; ++k, e *= 10) m /= 10; r = n - m * e;
return m == 1 ? (e / 10 * k + r + 1 + f(r)) : (e / 10 * k * m + e + f(r)); }
int digit_num(long long n) { int k; for (k = 0; n > 0; ++k) n /= 10; return k; }
int main() { int count = 0; long long n;
for (n = 1; n < 10000000000LL;) { long long v = f(n); if (v == n) { printf("%lld\n", n); ++n; ++count; } else if(v > n) n = v; else { int k = digit_num(n + n - v); n += (n - v) / k + 1; } }