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 add = "", ans = ""; if (n % 3 == 0) cnt = n / 3; else if (n % 3 == 1) { cnt = (n - 4) / 3; add = "11"; } else { cnt = n / 3; add = "1"; } for (int i = 0; i < cnt; i++) ans += "7"; System.out.println(ans + add); } }