let inp = open_in "holes.in";;
let n = Scanf.fscanf inp "%d" (fun n -> n);;
close_in inp;;

let s = match n with
  0 -> "1"
| 1 -> "0"
| n -> String.make (n mod 2) '4' ^ String.make (n / 2) '8';;

let out = open_out "holes.out";;
Printf.fprintf out "%s" s;;
close_out out;;
