import java.util.Scanner; class Main { public static void main(String... args) { Scanner sc = new Scanner(System.in); int matchQty = sc.nextInt(); System.out.println(matchNum(matchQty)); } public static String matchNum(int matchQty) { StringBuilder sb = new StringBuilder(""); if (matchQty % 2 == 0) { for (int i = 0; i < matchQty / 2; i++) { sb.append("1"); } } else { sb.append("7"); matchQty -= 3; for (int i = 0; i < matchQty / 2; i++) { sb.append("1"); } } return sb.toString(); } }