#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  while (n) {
    if (n >= 2) {
      s += "8";
      n -= 2;
    } else {
      s += "4";
      n -= 1;
    }
  }
  if ((int)s.size() <= 18)
    cout << s << endl;
  else
    cout << -1 << endl;
}
