#include<bits/stdc++.h>
using namespace std;
int main()
{
    int N;
    cin>>N;
    int maxdigits=N/2;
    int remain=N%2;
    int ifremain=0;
    if(N==1)
    {
        cout<<"-1"<<endl;
    }
    else
    {
        if(remain==1)
        {
            maxdigits--;
            remain+=2;
        }
        if(remain==3)
        {
            ifremain=7;
        }
        else
        {
            if(remain==4)
            {
                ifremain=4;
            }
            else
            {
                if(remain==5)
                {
                    ifremain=5;
                }
                else
                {
                    if(remain==6)
                    {
                        ifremain=9;
                    }
                    else
                    {
                        if(remain==7)
                        {
                            ifremain=8;
                        }
                        else
                        {
                        }
                    }
                }
            }
        }
    }
    if(remain!=0&&N!=1)
    {
        cout<<ifremain;
    }
    for(int i=0; i<maxdigits; i++)
    {
        cout<<"1";
    }
    cout<<endl;



    return 0;
}
