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