#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  long long n, k;
  cin >> k;
  if (k > 36) {
    cout << -1 << endl;
    return 0;
  }
  if (k % 2 == 0) {
    for (int i = 0; i < k / 2; ++i) {
      cout << 8;
    }
    cout << endl;
    return 0;
  }
  if (k % 2 == 1) {
    cout << 4;
    for (int i = 0; i < k / 2; ++i) {
      cout << 8;
    }
    cout << endl;
    return 0;
  }
  return 0;
}
