#include <bits/stdc++.h>
using namespace std;
int main() {
  int loops;
  cin >> loops;
  if (loops > 36) {
    cout << "-1" << endl;
    return 0;
  }
  char str[1000];
  memset(str, '\0', sizeof str);
  int k = 0;
  while (loops) {
    if (loops & 1) {
      str[k++] = '4';
      --loops;
    } else {
      str[k++] = '8';
      loops -= 2;
    }
  }
  cout << str << endl;
  return 0;
}
