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