#include <bits/stdc++.h>
using namespace std;
int a[100009], b[100009];
int main() {
  int n, m;
  int k;
  cin >> k;
  if (k <= 36) {
    if (k <= 18) {
      for (int i = 0; i < k; i++) cout << 4;
    } else {
      if (k % 2 == 0) {
        k /= 2;
        for (int i = 0; i < k; i++) cout << 8;
      } else {
        k = (k - 1) / 2;
        for (int i = 0; i < k; i++) cout << 8;
        cout << 4;
      }
    }
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
