function Main(input) { const N = parseInt(input.trim()) let result = (N % 2 === 1) ? "7" : "4" for (let i = 0; i < ~~(N / 2); i++) { result += "4" } console.log(result) } Main(require("fs").readFileSync("/dev/stdin", "utf8"))