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