#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
long long a[maxn + 10], b[maxn + 10];
int main() {
  int n;
  cin >> n;
  if (n > 36) return cout << -1, 0;
  while (n >= 2) cout << 8, n -= 2;
  if (n) cout << 4;
  return 0;
}
