#include <bits/stdc++.h>

#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/tag_and_trait.hpp>
using namespace __gnu_pbds;

using ll = long long;
using namespace std;


signed main() {
    int n;cin >> n;
    string s;
    for(;n > 1;){
        n -= 2;
        s.push_back('1');
    }
    if(n % 2 == 1){
        s.pop_back();
        s.push_back('7');
    }
    reverse(s.begin(), s.end());
    cout<<s<<endl;
}