#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int numbers[10] = {6, 2, 5, 5, 4, 5, 6, 3, 7, 6};
  while (N > 0) {
    if (N % 2 == 1) {
      N -= numbers[7];
      cout << 7;
    } else if (N >= numbers[1]) {
      N -= numbers[1];
      cout << 1;
    }
  }
  cout << endl;
  return 0;
}
