#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
int intcmp(const void *v1, const void *v2) { return *(int *)v1 - *(int *)v2; }
inline int read() {
  int x = 0, f = 1;
  char cc = getchar();
  while (cc < '0' || cc > '9') {
    if (cc == '-') f = -1;
    cc = getchar();
  }
  while (cc >= '0' && cc <= '9') {
    x = x * 10 + cc - '0';
    cc = getchar();
  }
  return x * f;
}
int main() {
  int n;
  n = read();
  if (n > 36)
    puts("-1");
  else {
    int num = n / 2;
    int num1 = n % 2;
    for (int i = 1; i < num + 1; i++) cout << "8";
    for (int i = 1; i < num1 + 1; i++) cout << "4";
  }
  cout << endl;
  return 0;
}
