import java.util.Scanner object matching { def main(args: Array[String]): Unit = { val sc = new Scanner(System.in) var n = sc.nextInt var lst = List[Int]() while(n >= 2 && n != 3) { n = n - 2 lst = 1 :: lst } if(n == 3) { lst = 7 :: lst } println(lst.mkString("")) } }