var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=input.trim().split("\n").map(Number);
(function(a,b,c,d,p){
   var X=a*p;
   var Y=b;
   if(c<p)Y+=(p-c)*d;
   console.log(Math.min(X,Y));
}).apply(null,Arr);