#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  scanf("%d", &k);
  if (k >= 37) {
    printf("-1\n");
    return 0;
  }
  int resto = k % 2;
  int div = k / 2;
  while (resto--) {
    printf("4");
  }
  while (div--) {
    printf("8");
  }
  printf("\n");
  return 0;
}
