a, b, x = gets.chomp.split.map{|i| i.to_i }

na = 0; nb = 0
cost = 20000 * 1000  # cost_max

while na <= (x / 1000.0).ceil
    nb = ((x - 1000 * na) / 500.0).ceil
    if nb < 0 then nb = 0 end
    cost_tmp = a * na + b * nb
    cost = [cost_tmp, cost].min
    na += 1
end

puts cost
