#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k = 0;
  string ans = "";
  cin >> n;
  while (n > 1) {
    ans += "8";
    k += 1;
    n -= 2;
  }
  if (n == 1) {
    ans += "9";
    k++;
    n--;
  }
  if (k < 19)
    cout << ans;
  else
    cout << -1;
  return 0;
}
