#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void in(long long int *a, long long int n) {
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
}
void out(long long int *a, long long int n) {
  for (long long int i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
}
long long int modexpo(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  long long int temp = modexpo(a, b / 2);
  if (b % 2) return (temp % 1000000007 * temp % 1000000007 * a) % 1000000007;
  return (temp % 1000000007 * temp % 1000000007) % 1000000007;
}
long long int fact(long long int n) {
  long long int temp = 1;
  long long int k = n;
  while (k--) {
    temp = (temp * n) % 1000000007;
    n--;
  }
  return temp;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int findlcm(long long int arr[], long long int n) {
  long long int ans = arr[0];
  for (long long int i = 1; i < n; i++)
    ans = (((arr[i] * ans)) / (gcd(arr[i], ans)));
  return ans;
}
map<long long int, long long int> m;
void primefactors(long long int n) {
  while (n % 2 == 0) {
    m[2]++;
    n = n / 2;
  }
  for (long long int i = 3; i <= sqrt(n); i++) {
    while (n % i == 0) {
      m[i]++;
      n = n / i;
    }
  }
  if (n > 2) m[n]++;
}
int main() {
  fast();
  long long int tc = 1;
  while (tc--) {
    long long int n;
    cin >> n;
    if (n % 2 == 0) {
      for (long long int i = 0; i < n / 2; i++) cout << "1";
    } else {
      cout << "7";
      n = n - 3;
      for (long long int i = 0; i < n / 2; i++) cout << "1";
    }
  }
  return 0;
}
