#include <bits/stdc++.h>
using namespace std;
int k;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> k;
  if (k > 36)
    cout << -1;
  else {
    while (k > 1) {
      cout << 8;
      k -= 2;
    }
    if (k) cout << 6;
  }
}
