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