#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  if (n <= 36) {
    string s = "";
    long long t = n / 2;
    for (int i = 0; i < t; i++) {
      s = s + '8';
    }
    if (n % 2 != 0) {
      s = s + "6";
    }
    cout << s;
  } else {
    cout << -1;
  }
  return 0;
}
