def digitsum(n):
	
	count = 0 
	while n > 0:
		count += n%10
		n = int(n/10)
		
	return count
	
def loop(n, k):
	
	while k < 1000:
		k_d = digitsum(k)
		k_d_d = digitsum(k_d)
		
		if k/k_d <= k_d/k_d_d:
			print(k)
		k += 1
		

k = 1
n = int(input())
loop(n, k)