#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  if (k > 36) {
    printf("-1");
    return 0;
  }
  if (k & 1) {
    while (k != 1) {
      cout << "8";
      k -= 2;
    }
    cout << "4";
  } else {
    while (k != 0) {
      cout << "8";
      k -= 2;
    }
  }
  cout << endl;
}
