#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 0, p, i;
  cin >> p;
  if (p % 2 == 0 && p <= 36) {
    for (i = 0; i < p / 2; i++) {
      cout << "8";
    }
    cout << endl;
  } else if (p % 2 != 0 && p < 36) {
    for (i = 0; i < (p - 1) / 2; i++) {
      cout << "8";
    }
    cout << "6" << endl;
  } else
    cout << "-1" << endl;
  return 0;
}
