#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1000000000009;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n{};
  cin >> n;
  if (n > 36)
    cout << "-1"
         << "\n";
  else {
    while (n > 1) {
      cout << "8";
      n -= 2;
    }
    if (n == 1) cout << "4\n";
  }
  return 0;
}
