#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int maxn = 300009;
const int maxm = 300009;
const double pi = acos(-1.0);
const double eps = 1e-6;
long long myrand(long long mod) {
  return ((long long)rand() << 32 ^ (long long)rand() << 16 ^ rand()) % mod;
}
template <class T>
inline bool scan_d(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return false;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return true;
}
template <class T, class... Args>
inline bool scan_d(T &ret, Args &...args) {
  scan_d(ret);
  scan_d(args...);
}
inline bool scan_ch(char &ch) {
  if (ch = getchar(), ch == EOF) return false;
  while (ch == ' ' || ch == '\n') ch = getchar();
  return true;
}
inline void out_number(long long x) {
  if (x < 0) {
    putchar('-');
    out_number(-x);
    return;
  }
  if (x > 9) out_number(x / 10);
  putchar(x % 10 + '0');
}
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  while (cin >> n) {
    if (n > 36) {
      cout << -1 << endl;
      continue;
    }
    while (n % 2) {
      n--;
      cout << 4;
    }
    while (n) {
      n -= 2;
      cout << 8;
    }
    cout << endl;
  }
  return 0;
}
