n, p, q = gets.split.map(&:to_i)

cs = (1..n).map { gets.to_i }

sum = p * (q + q + n - 1) * n / 2

k = 0

(n-1).downto(0) do |i|
    d = cs[i] - (p * k * 2 + (q + q + i) * (i+1) / 2)
    if d > 0
        sum += d
    else
        k += 1
    end
end

p sum