#include <bits/stdc++.h>
using namespace std;
int main() {
  long long k, c, d;
  scanf("%I64d", &k);
  if (k > 36) {
    printf("-1\n");
    return 0;
  }
  string str = "";
  if (k % 2 == 0) {
    c = k / 2;
    for (int i = 0; i < c; ++i) {
      str += '8';
    }
  } else {
    str += '4';
    c = (k - 1) / 2;
    for (int i = 0; i < c; ++i) {
      str += '8';
    }
  }
  cout << str << endl;
}
