package main

import (
	"bytes"
	"fmt"
)

func resolve(N int) string {
	if N < 2 {
		return "0"
	}
	r := new(bytes.Buffer)
	if N%2 == 1 {
		r.WriteString("7")
	} else {
		r.WriteString("1")
	}
	N -= 2
	for i := 0; i < (N / 2); i++ {
		r.WriteString("1")
	}
	return r.String()
}

func main() {
	var N int
	fmt.Scanf("%d\n", &N)
	fmt.Println(resolve(N))
}