跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F0885. Maximum Number

    ID: 891 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 2 上传者: 标签>构造贪心模拟算法思想编程与模拟基础难度共享题库Codeforces英文题面题目来源题面语言

Maximum Number

题目描述

C. Maximum Number
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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.

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

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

Output

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

Examples
Input
2
Output
1
Input
3
Output
7


题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 318 题。保留原作者与原赛事署名。