#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string x;
  while (n >= 2) {
    x += '8';
    n -= 2;
  }
  if (n == 1) x += '6';
  if (x.size() > 18) x = "-1";
  cout << x << endl;
  return 0;
}
