#include #define rep(i,l,r)for(int i=(l);i<(r);i++) int main(){ int n; scanf("%d",&n); if(n%2){ printf("7"); int x=(n-3)/2; rep(i,0,x)printf("1"); }else{ int x=n/2; rep(i,0,x)printf("1"); } }