e-olymp
Problems

Three digit numbers

Three digit numbers

Find all three digit numbers with sum of digits equals to n.

Input

One integer n (0n28).

Output

Print in the first line the number of found three digit numbers. In the next lines print these numbers in increasing order.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3
Output example #1
6
102
111
120
201
210
300
Input example #19
18
Output example #19
54
189
198
279
288
297
369
378
387
396
459
468
477
486
495
549
558
567
576
585
594
639
648
657
666
675
684
693
729
738
747
756
765
774
783
792
819
828
837
846
855
864
873
882
891
909
918
927
936
945
954
963
972
981
990