#include<bits/stdc++.h>
using namespace std;
const int sv[10] = {6,2,5,5,4,5,6,3,7,6};
long long ans = 0;
long long a = -1;
/*bool valid(int n,int a){
    int sum = 0;
    while(a>0){
        sum+= sv[a%10];
        a/=10;
    }
    if(sum == n){
        return true;
    }
    return false;
}
*/

void gen(int n){
    //cout<<"n  = " << n <<endl;
    if(n == 0){
        a = max(a,ans);
        ans /=10;
        return;
    }
    for(int i = 0; i < 10 ; i++){
        //cout<<"za i =  " << i << " n = "<< n<<endl ;
        if(n-sv[i] >= 0){
            //cout<<" push back:" << i <<endl;
            //cout<<n<<" "<<"sv"<<sv[i]<<endl;
            ans = 10*ans + i;
            gen(n-sv[i]);
        }
    }
    ans/=10;
    return;
}
int main(){
    int n;
    cin>>n;
    if(n<=1){
        cout<<-1;
        return 0;
    }
    if(n%2==0){
        for(int i = 0; i< n/2 ;i ++){
            cout<<1;
        }
        return 0;
    }else{
        cout<<7;
        for(int i = 0; i< (n-3)/2 ;i ++){
            cout<<1;
        }
        return 0;
    }
    gen(n);
    cout<<a;
}
