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