#define _USE_MATH_DEFINES	//M_PI
#include <iostream>			//std::cout, std::cin
#include <string>			//std::string
#include <vector>			//std::vector
#include <valarray>			//std::valarray	数値のみの一次配列
#include <algorithm>		//std::sort
#include <time.h>			//localtime_s
#include <cstdlib>			//abs
#include <cmath>			//abs, std::pow, sqrt, sin, cos,
#include <fstream>			//std::ifstream
#include <iomanip>			//std::setprecision
#include <random>			//std::random(C++11)
#include <numeric>			//std::accumulate

int main(void) {

	//test用
	//std::ifstream in("test.txt");
	//std::cin.rdbuf(in.rdbuf());

	int N;
	std::cin >> N;

	if (N == 3) {
		std::cout << 7 << std::endl;
	}
	else {
		if (N % 2 == 0) {
			for (int i = 0; i < N / 2; i++) {
				std::cout << 1;
			}
			std::cout << std::endl;
		}
		else {
			std::cout << 7;
			for (int i = 0; i < (N / 2) - 1; i++) {
				std::cout << 1;
			}
			std::cout << std::endl;
		}
	}
}