'use strict'

const main = input => {
	const args = input.split('\n')
	const n = parseInt(args[0], 10)
	const k = parseInt(args[1], 10)
	const x = parseInt(args[2], 10)
	const y = parseInt(args[3], 10)
	let sum = 0
	for (let i = 1; i <= n; i++) {
		if (i <= k) sum += x 
		else sum += y
	}
	console.log(sum)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
