include <stdio.h>

include <math.h>

main()
{
int x, a, b, c, d, y;
for (x = 1000; x < 10000; x++)
{
d=x/1000;
c=(x-d1000)/100;
b=(x-d
1000-c100)/10;
a=x%10;
y=(a
1000+b100+c10+d);
if (x*9==y)
{
printf("%d\n",x );
break;
}
}
}