#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x %= p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  {
    long long n;
    cin >> n;
    map<long long, long long> m;
    m[9] = 6;
    m[8] = 7;
    m[7] = 3;
    m[5] = 5;
    m[4] = 4;
    m[1] = 2;
    long long a[10];
    if (n & 1) {
      { cout << 7; }
      n -= 3;
      for (int i = 1; i <= n / 2; i++) {
        cout << 1;
      }
      cout << "\n";
    } else {
      for (int i = 1; i <= n / 2; i++) {
        cout << 1;
      }
      cout << "\n";
    }
  }
  return 0;
}
