#include <iostream>
using namespace std;

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

    while(N>0){
        if(N%2==1){
            N -= 3;
            cout << 7;
        }

        if(N<=0) break;

        if(N%2==0){
            N -= 2;
            cout << 1;
        }
    }

    cout << endl;
    return 0;
}