package yukicoder; import java.util.Scanner; public class Yuki83{ public static void main(String[] args) { // int numbers[] = {8,2,5,5,5,4,5,6,3,7,6}; Scanner scan = new Scanner(System.in); int num = scan.nextInt(); scan.close(); int two_num = 0; int three_num = 0; String ans = ""; two_num = num / 2; if (three_num == 3){ three_num ++; } else if(num % 2 != 0) { two_num = two_num -1; three_num ++; } for(int i =0; i < two_num; i++ ) { ans += "1"; } for(int i =0; i < three_num; i++ ) { ans += "7"; } System.out.println(ans); /* int ans = 0; int ans2 = 0; String strAns = ""; for (int i = 0; i <= 9 ; i++ ) { if(ans >= ans2){ ans2 = ans; if(count < num[i]){ ans = num[i]/count; for(int j = 0; j < i; j++) { strAns += String.valueOf(i); } ans = Integer.parseInt(strAns); }else{ ans = (count / num[i]); strAns += String.valueOf(ans); for(int j = 0; j < i; j++) { strAns += String.valueOf(i); } ans = Integer.parseInt(strAns); } } } System.out.println(ans); */ } }