#include <bits/stdc++.h>
using namespace std;
const long long infi = 9223372036854775807;
const long long MAX = (long long)1e6;
void readi(int &x) {
  char c = getchar();
  while (!isdigit(c = getchar()))
    ;
  x = c - '0';
  while (isdigit(c = getchar())) x = x * 10 + c - '0';
}
const int MAXL = 100;
struct Matrix {
  int n, m;
  int v[MAXL][MAXL];
};
Matrix operator*(const Matrix a, const Matrix b) {
  Matrix ans;
  ans.n = a.n;
  ans.m = b.m;
  for (int i = 1; i <= a.n; i++)
    for (int j = 1; j <= b.m; j++) {
      ans.v[i][j] = 0;
      for (int k = 1; k <= a.m; k++) ans.v[i][j] += a.v[i][k] * b.v[k][j];
    }
  return ans;
}
const int initt = 1;
template <typename T>
T fpow(T a, long long k) {
  T base = initt;
  while (k) {
    if (k & 1) base = base * a;
    a = a * a;
    k >>= 1;
  }
  return base;
}
template <typename T>
void merge(T v[], int l, int mid, int r) {
  if (r - l <= 30) {
    for (int i = l + 1; i <= r; i++) {
      T t = v[i];
      int j;
      for (j = i - 1; j >= l; j--)
        if (t < v[j])
          v[j + 1] = v[j];
        else
          break;
      v[j + 1] = t;
    }
  } else {
    T *temp = new T[r - l + 3];
    int i = l, j = mid + 1, t = 0;
    while (i <= mid && j <= r) {
      if (v[i] <= v[j])
        temp[t++] = v[i++];
      else
        temp[t++] = v[j++];
    }
    while (i <= mid) temp[t++] = v[i++];
    while (j <= r) temp[t++] = v[j++];
    for (i = l, j = 0; i <= r; i++, j++) v[i] = temp[j];
    delete temp;
  }
}
template <typename T>
void divide(T v[], int left, int right) {
  int mid = (left + right) >> 1;
  if (right - left > 30) {
    divide(v, left, mid);
    divide(v, mid + 1, right);
    if (v[mid] <= v[mid + 1]) return;
  }
  merge(v, left, mid, right);
}
int main() {
  long long k;
  scanf("%I64d", &k);
  if (k > 18 * 2)
    puts("-1");
  else if (!k)
    puts("1");
  else {
    while (k > 1) {
      putchar('8');
      k -= 2;
    }
    if (k) putchar('6');
    putchar('\n');
  }
  return 0;
}
