#include <bits/stdc++.h>
using namespace std;
int read() {
  char c = getchar();
  int f = 1, sum = 0;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    sum = sum * 10 + c - '0';
    c = getchar();
  }
  return sum * f;
}
int k;
int main() {
  k = read();
  if (k > 36) {
    printf("-1");
    return 0;
  }
  if (k & 1) {
    printf("4");
    k--;
  }
  k >>= 1;
  for (int i = 1; i <= k; i++) printf("8");
  return 0;
}
