#include <bits/stdc++.h>
using namespace std;
int xx[4] = {0, 0, 1, -1};
int yy[4] = {-1, 1, 0, 0};
map<char, long long> mp;
int main() {
  long long n;
  scanf("%lld", &n);
  int arr[10];
  arr[2] = 1;
  arr[3] = 7;
  arr[4] = 4;
  arr[5] = 5;
  arr[6] = 9;
  arr[7] = 8;
  if (n <= 7) {
    if (n % 2 != 0) {
      long long x = n / 2;
      for (long long i = 0; i < x; i++) i == 0 ? cout << 7 : cout << 1;
      cout << endl;
    } else {
      for (long long i = 0; i < n / 2; i++) cout << 1;
      cout << endl;
    }
  } else {
    long long res = (n / 2);
    for (int i = 0; i < res; i++) {
      if (i == 0) {
        if (n % 2 == 0)
          cout << 1;
        else
          cout << 7;
      } else
        cout << 1;
    }
    cout << endl;
  }
  return 0;
}
