#include <iostream>

using namespace std;

int main()
{
    int N;
    cin >> N;

    if (N < 2)
    {
        cout << -1;
        return 0;
    }

    int D = N / 2;

    if ((D * 2) != N)
    {
        cout << 7;
        D--;
    }

    for (int i = 0; i < D; i++)
    {
        cout << 1;
    }
}
