import java.io.*; import java.util.*; class Main155 { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int cnt = 0; String ans = "", add = ""; if (n % 2 == 0) cnt = n / 2; else { cnt = (n - 3) / 2; add = "7"; } for (int i = 0; i < cnt; i++) ans += "1"; System.out.println(ans + add); } }