#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long N = 2e5 + 7;
const int mod = 1e9 + 7;
bool cmp(const pair<long long, long long>& a,
         const pair<long long, long long>& b) {
  return a.first < b.first;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> v;
  if (n % 2 == 0) {
    for (long long i = 0; i < n / 2; i++) {
      v.push_back(1);
    }
  } else {
    v.push_back(7);
    n = n - 3;
    for (long long i = 0; i < n / 2; i++) {
      v.push_back(1);
    }
  }
  for (auto i : v) {
    cout << i;
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
