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