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