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