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