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