(defmacro inner-input []
  '(->> (clojure.string/split (read-line) #"\s")
     (map #(Integer/parseInt %))))

(defn input []
  (let [[N] (inner-input)
        [D X] (inner-input)]
    (list N D X
      (loop [n N As '()]
        (if (zero? n)
          As
          (recur (dec n) (concat As (inner-input))))))))

(defn Chocolate [[N D X As]]
  (->> As
    (map #(count (range 1 (inc D) %)))
    (apply +)
    (partial + X)))

(-> (input)
  Chocolate
  println)