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