import java.util.Scanner; public class Main_yukicoder83 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if (n % 2 == 0) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < n / 2; i++) { sb.append('1'); } System.out.println(sb); } else { n -= 3; StringBuilder sb = new StringBuilder(); sb.append('7'); for (int i = 0; i < n / 2; i++) { sb.append('1'); } System.out.println(sb); } sc.close(); } }