#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int INF = 1e9 + 7;
const long long LINF = 1000000000000000001LL;
const long double EPS = 1e-9;
const long double PI = 3.141592653589793;
inline void hi(void) {
  cout << fixed << setprecision(16);
  srand(INF);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
inline void bye(void) { exit(0); }
signed main() {
  hi();
  long long k;
  cin >> k;
  map<int, char> m = {{1, '4'}, {0, '1'}, {2, '8'}};
  int s2 = k / 2;
  int s1 = (k % 2);
  if (s2 + s1 > 18) {
    cout << "-1\n";
    bye();
  }
  for (int i = 0; i < s2; ++i) {
    cout << m[2];
  }
  for (int i = 0; i < s1; ++i) {
    cout << m[1];
  }
  cout << "\n";
  bye();
}
