#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> sol;
  int n;
  scanf("%d", &n);
  while (n != 0) {
    if (n - 2 != 1) {
      n -= 2;
      sol.push_back(1);
    } else {
      n -= 3;
      sol.push_back(7);
    }
  }
  sort((sol).rbegin(), (sol).rend());
  for (int i = 0; i < sol.size(); i++) {
    printf("%d", sol[i]);
  }
  printf("\n");
  return 0;
}
