#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n;
    cin >> n;
    string res;
    while(n >= 2) {
        if(n % 2 == 1) {
            res += '7';
            n -= 3;
        } else {
            res += '1';
            n -= 2;
        }
    }
    cout << res << endl;
}