#include <bits/stdc++.h>
using namespace std;
int lp[10] = {1, 0, 0, 0, 1, 0, 1, 0, 2, 1};
int main() {
  int n;
  cin >> n;
  if (n > 36) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n / 2; i++) cout << 8;
  if (n & 1) cout << 4 << endl;
  return 0;
}
