#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  if (k > 36) {
    cout << -1 << endl;
  } else {
    for (int i = 0; i < k / 2; i++) {
      cout << 8;
    }
    if (k % 2 != 0) {
      cout << 6 << endl;
    } else {
      cout << endl;
    }
  }
  return 0;
}
