a, b, x = gets.chomp.split.map(&:to_i)
x = (x / 500.0).ceil

dp1 = [0]
1.upto(x){|y|
    if y <= 2
        dp1[y] = a
    else
        dp1[y] = dp1[y - 2] + a
    end
}

dp2 = [0]
1.upto(x){|y|
    if y <= 1
        dp2[y] = [dp1[y], b].min
    else
        dp2[y] = [dp1[y], dp2[y - 1] + b].min 
    end
}
puts dp2[x]

