#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int a = n / 2;
  int b = n % 2;
  if (a + b > 18) {
    printf("-1\n");
    return 0;
  }
  for (int i = 1; i <= a; i++) printf("8");
  for (int i = 1; i <= b; i++) printf("6");
  printf("\n");
  return 0;
}
