#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int k, z, y, x;
  cin >> k;
  if (k > 36) {
    cout << -1;
    return 0;
  }
  if (k == 0) {
    cout << 1;
    return 0;
  }
  if (k % 2 == 0) {
    z = k / 2;
    for (int i = 1; i <= z; ++i) cout << 8;
  } else {
    z = k / 2;
    for (int i = 1; i <= z; ++i) cout << 8;
    cout << 4;
  }
  return 0;
}
