import java.util.Scanner; class S21_maxMaching{ public static void main(String[] args){ int num; Scanner sc = new Scanner(System.in); num = sc.nextInt(); if(num % 2 == 1){ System.out.print("7"); num -= 3; } num /= 2; for(int i = 0; i < num; i++){ System.out.print("1"); } System.out.println(""); } }