#include <bits/stdc++.h>
using namespace std;
int a[] = {1, 0, 0, 0, 1, 0, 1, 0, 2, 1};
int main() {
  int k;
  scanf("%d", &k);
  if (k > 36)
    puts("-1");
  else {
    int step = 0;
    while (k >= 2 && step < 18) {
      putchar('8');
      step++;
      k -= 2;
    }
    if (k) putchar('4'), step++;
    while (step < 18) putchar('1'), step++;
  }
}
