function Main(input) { var lines = input.split("\n"); // N var stickCount=parseInt(lines[0]); var digitCount = parseInt(stickCount / 2); //console.log(digitCount); var lastEqualSeven = false; var rest = stickCount % 2; if( 0 < rest ) { if( 0 < digitCount ) { lastEqualSeven = true; } } var strCount = "1"; if( lastEqualSeven ) { strCount = "7"; } for( var i=1; i < digitCount; i++ ) { strCount += "1"; } console.log(strCount); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));