import sequtils, strutils let d = parseInt readLine stdin xs = stdin.readLine.split.map parseInt echo d * xs.min