#include <bits/stdc++.h>
using namespace std;
const int MAX = 100;
void fast() { std::ios_base::sync_with_stdio(0); }
int main() {
  int k;
  cin >> k;
  int cnt = 0;
  string s = "";
  if (k & 1) {
    k--;
    for (int i = 0; i < k & cnt <= 18; i += 2) {
      s += '8';
      cnt++;
    }
    s += '4';
    cnt++;
  } else {
    for (int i = 0; i < k & cnt <= 18; i += 2) {
      s += '8';
      cnt++;
    }
  }
  if (cnt > 18) {
    cout << -1 << endl;
    return 0;
  } else {
    cout << s << endl;
  }
  return 0;
}
