#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
int main(void) {
	long k, i = 0, j, cnt = 0, cnt1 = 0, m, ans3;
	double b, d, l, ans2, ans, c;
	scanf("%ld", &k);
	while(1) {
		if (i < 9) {
			i++;
		}
		else {
			i += 10;
		}
		ans=0;
		cnt = 0;
		c = i;
		for (j = 15; j >= 0; j--) {
			b = pow(10, j);
			if (c >= b) {
				ans += (int)c / (int)b;
				c -= (int)c / (int)b * b;
			}
		}
		ans = i / ans;
		for (l = i + 1; l < i+100000; l++) {
			ans2 = 0;
			d = l;
			for (j = 15; j >= 0; j--) {
				b = pow(10, j);
				if (d >= b) {
					ans2 += (int)d / (int)b;
					d -= (int)d / (int)b * b;
				}
			}
			ans2 = l / ans2;
			if (ans > ans2) {
				cnt = 1;
				break;
			}
		}
		if (cnt == 0) {
			printf("%ld\n", i);
			cnt1++;
			if (i == 99999) {
				//break;
			}
		}
		if (cnt1 == k) {
			break;
		}
	}