import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(stdReader.readLine());
		StringBuilder sb = new StringBuilder();
		if(n%2==0){
			for(int i=0;i<n/2;i++) sb.append("1"); 
		}else{
			while(n>2 && n%2 !=0){
				sb.append("7");
				n-=3;
			}
			if(n%2 == 0){
				for(int i=0;i<n/2;i++) sb.append("1");
			}
		}
		System.out.println(sb.toString());
	}
}