#include <bits/stdc++.h>
using namespace std;
long long maxm = -1e18;
long long minm = 1e18;
bool isP(long long n) {
  if (n == 2LL) return 1;
  if (n % 2LL == 0LL)
    return 0;
  else if (n == 1)
    return 0;
  for (long long i = 3; i * i <= n; ++i)
    if (n % i == 0) return 0;
  return 1;
}
void solve() {
  int n;
  cin >> n;
  string res;
  while (n > 0) {
    if (n == 3) {
      res = res + "7";
      n -= 3;
    } else {
      res = res + "1";
      n -= 2;
    }
  }
  string result;
  for (int i = res.length() - 1; i >= 0; i--) {
    result = result + res[i];
  }
  cout << result << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
