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

(defn PooisonousCookies [[A B C]]
  (if (< (+ A B) C)
    (+ A B)
    (+ B C)))


(->> (input)
  PooisonousCookies
  println)