1931.Maximum Number

Time Limit: 1s Memory Limit: 256MB

Stepan has the newest electronic device with a display. Different digits can be shown on it. Each digit is shown on a seven-section indicator like it is shown on the picture below.

1931_1.png

So, for example, to show the digit 3 on the display, 5 sections must be highlighted; and for the digit 6, 6 sections must be highlighted.

The battery of the newest device allows to highlight at most n sections on the display.

Stepan wants to know the maximum possible integer number which can be shown on the display of his newest device. Your task is to determine this number. Note that this number must not contain leading zeros. Assume that the size of the display is enough to show any integer.

Input Format(From the terminal/stdin)

The first line contains the integer n (2 \le n \le 100000) - the maximum number of sections which can be highlighted on the display.

Output Format(To the terminal/stdout)

Print the maximum integer which can be shown on the display of Stepan's newest device.

Sample Input 1

Copy
2
 \n

Sample Output 1

Copy
1
 \n

Sample Input 2

Copy
3
 \n

Sample Output 2

Copy
7
 \n

Submit

请先 登录

© 2025 FAQs