#include <bits/stdc++.h>
using namespace std;
inline int getint() {
  int f = 1, x = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
inline long long getll() {
  long long f = 1, x = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int n;
int main() {
  n = getint();
  if (n % 2) printf("7"), n -= 3;
  while (!(n % 2) && n > 0) {
    printf("1");
    n -= 2;
  }
  return 0;
}
