let () =
  let rec makelst k x d =
    if k * x + 1 > d then [] else k * x + 1 :: makelst (k+1) x d in
  Scanf.scanf "%d\n%d %d\n" @@ fun n d x ->
  let arr = Array.init n @@ fun _ -> 
  	Scanf.scanf "%d\n" @@ fun a -> List.length (makelst 0 a d) in
  let num = Array.fold_left (+) 0 arr in
  Printf.printf "%d\n" (x+num)