#include <bits/stdc++.h>
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9;
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n > 36)
    cout << "-1" << endl;
  else if (n == 1)
    cout << "6" << endl;
  else {
    while (n) {
      if (n >= 2) {
        cout << "8";
        n -= 2;
      } else {
        cout << "0";
        n -= 1;
      }
    }
    cout << endl;
  }
  return 0;
}
