Олимпиадный тренинг

Задача 38217. Division with remainder


Задача

Темы: Цикл for
Vasya is learning to divide with the remainder. He took some number, divided it by 2 and discarded the remainder. What happened, divided by 3 and again discarded the remainder. He divided the resulting number by 4, discarded the remainder and got the number K. What number could Vasya choose initially?

Input
Enter a natural number K not exceeding 1000 .

Imprint
Print all possible numbers that Vasya could have chosen initially, in ascending order, separating them with spaces.
Examples
# Input Output
1 1 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47