Electronic Lock
InterviewTime limit2sMemory limit1024 MB
Given at most n lit segments on a 7-segment display, print the largest natural number that can be shown.
Problem
The traitors have locked the doors again. To open them, you need to enter a code.
The code entry field is an infinite sequence of 7-segment displays. The code is the largest natural number that can be shown using at most lit segments.

Fig. 2: Examples of how each digit is shown on a 7-segment display.
Help the team find the code.
Input
The first line contains one integer , the maximum number of lit segments used to display a number ().
Output
Print one number, the required code.
Hint
Since the digit 1 has only two lit segments, the number 111 uses 6 lit segments in total.