#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
const long long int INF = 2e18;
const int mxn = 2e9 + 9;
const int mxd = 2e5 + 5;
const int mxa = 1e5 + 5;
int64_t gcd(int64_t a, int64_t b) {
  if (b == 0LL) return a;
  return gcd(b, a % b);
}
int64_t lcm(int64_t a, int64_t b) { return (a / gcd(a, b) * b); }
using namespace std;
int64_t maxll(int64_t x, int64_t y) { return x > y ? x : y; }
int64_t minll(int64_t x, int64_t y) { return x < y ? x : y; }
int can_be(int n) {
  if (n == 7)
    return 8;
  else if (n == 6)
    return 9;
  else if (n == 5)
    return n;
  else if (n == 3)
    return 7;
  else if (n == 2)
    return 1;
  else
    return 0;
}
void Run_Case() {
  int n;
  cin >> n;
  int div = n / 2;
  if (n == 3) {
    cout << "7" << '\n';
    return;
  }
  if (n % 2 == 1) {
    cout << "7";
    string str(div - 1, '1');
    cout << str << '\n';
  } else {
    string str(div, '1');
    cout << str << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T;
  T = 1;
  while (T--) {
    Run_Case();
  }
  return 0;
}
