#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int MN = 1e9;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  int n;
  cin >> n;
  string maxnum = "";
  if (n % 2 == 0) {
    for (int i = 1; i <= n; i += 2) maxnum += '1';
  } else {
    maxnum += '7';
    n -= 3;
    for (int i = 1; i <= n; i += 2) maxnum += '1';
  }
  cout << maxnum << endl;
  return 0;
}
