#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int main() {
  int a;
  cin >> a;
  if (a > 18 * 2)
    cout << -1 << endl;
  else {
    while (a != 0) {
      if (a >= 2) {
        printf("8");
        a -= 2;
      } else if (a == 1) {
        printf("6");
        a--;
      }
    }
    printf("\n");
  }
  return 0;
}
