#include <iostream>
#include <math.h>
#include <algorithm>
#include <functional>
#include <vector>
#include <typeinfo>
#include <climits>
#include <ctype.h>
#include <string>
#include <stdio.h>
using namespace std;
#define INIT cin.tie(0); ios::sync_with_stdio(false);
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define REP(i, n) for(int i = 0; i < n; i++)

int main(){
    INIT;

    int n;
    cin >> n;

    if(n % 2 != 0) cout << 7, n -= 3;
    else cout << 1, n -= 2;

    if(n > 0){
        while(1){
            cout << 1;
            n -= 2;
            if(n == 0) break;
        }
    }
    cout << endl;

    return 0;
}