#include<iostream>
using namespace std;
int main () {
    long long N;
    cin>>N;
    if(N<2){
        cout<<-1<<"\n";
        return 0;
    }if(N==2){
        cout<<1<<"\n";
        return 0;
    }
    if(N%2==1){
        cout<<7;
        N-=3;
    }
    for(int i=N;i>0;i-=2){
        cout<<"1";
    }
    cout<<"\n";

}
