import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int k = N / 6; int r = N % 6; String ans = ""; for(int i = 0; i < k; i++) { ans += "111"; } if(r == 5) ans = "7" + ans + "1"; if(r == 4) ans = ans + "11"; if(r == 3) ans = "7" + ans; if(r == 2) ans = ans + "1"; if(r == 1) { ans = "711"; for(int i = 0; i < k - 1; i++) { ans += "111"; } } System.out.println(ans); } }