C. Maximum Number

Codeforces
IDCF774C
Time1000ms
Memory256MB
Difficulty
constructive algorithmsgreedyimplementation
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. <center>![image](https://espresso.codeforces.com/1b26f8faef5a8a5117060246d28eb2aea6e5ebe8.png)</center>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_ ≤ 100 000) — 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. [samples]
Samples
Input #1
2
Output #1
1
Input #2
3
Output #2
7
API Response (JSON)
{
  "problem": {
    "name": "C. Maximum Number",
    "description": {
      "content": "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. <center>![image](h",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF774C"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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.\n\n<center>![image](h...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments