#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string maxNumber = "";
  if (n % 2 == 0) {
    for (int j = 0; j < n / 2; j++) {
      maxNumber += "1";
    }
  } else {
    maxNumber += "7";
    n -= 3;
    for (int j = 0; j < n / 2; j++) {
      maxNumber += "1";
    }
  }
  cout << maxNumber;
}
