You may have seen a mechanical typewriter — such devices were widespread only a few decades ago, before computers replaced them. It is a very simple thing. You strike a key on the typewriter keyboard, the corresponding type bar rises, and the metallic letter molded into the type bar strikes the paper. The art of typewriter typing, however, is more complicated than the art of computer typing: you should strike the keys with some force, otherwise the prints will not be dark enough; but you should not overdo it, otherwise the paper will be damaged.
Imagine a typewriter with very sharp letters, which cut the paper instead of printing on it. When the digit 0 is typed on such a typewriter, it makes a nice hole in the paper (and you receive a small paper oval as a bonus). The same happens with some other digits: 4, 6, and 9 each produce one hole, and 8 produces two touching holes. The remaining digits (1, 2, 3, 5, 7) just cut the paper without making any holes.
You want to make an art installation consisting of an empty sheet of paper with exactly h holes, made by typing a single non-negative integer on the cutting typewriter described above. Among all numbers that produce exactly h holes, the number must be the smallest possible, and it must not have leading zeroes. Write a program that generates the required number.
A single integer h (0 ≤ h ≤ 510) — the number of holes.
Print the number that must be typed.