#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;

int main() {
	int N;
	cin >> N;

	int ans[1000000];
	int i = 0;

	while (N >= 1) {
		if (N == 3) {
			ans[i++] = 7;
			N -= 3;
		} else {
			ans[i++] = 1;
			N -= 2;
		}
	}
	sort(ans, ans + i);

	for (int j = i - 1; j >= 0; j--)
		cout << *(ans + j);
}