package main import ( "fmt" "io" "os" ) func main() { resolve(os.Stdout, os.Stdin) } func writeOne(w io.Writer, num int) error { for i := 0; i < num; i++ { _, e := fmt.Fprint(w, "1") if e != nil { return e } } return nil } func resolve(w io.Writer, r io.Reader) error { var match int _, e := fmt.Fscanf(r, "%d", &match) if e != nil && e != io.EOF { return e } if match%2 == 0 { e := writeOne(w, match/2) if e != nil { return e } } else { _, e := fmt.Fprint(w, "7") if e != nil { return e } ee := writeOne(w, ((match-1)/2 - 1)) if ee != nil { return ee } } fmt.Fprintln(w) return nil }