#include<bits/stdc++.h>
#define endl '\n'

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    string answer;
    int count_of_1 = 0;

    long long unsigned int num;
    cin >> num;

    if (num % 2 == 0) {
        count_of_1 = num / 2;

        for (int i = 0; i < count_of_1; i++) {
            answer += '1';
        }
        cout << answer;
        return 0;
    }
    else {
        count_of_1 = num / 2 - 1;

        answer += '7';
        for (int i = 0; i < count_of_1; i++) {
            answer += '1';
        }
        cout << answer;
        return 0;
    }

    return 0;
}
