#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int c,d,m,n,k,ans=0,temp1=0,temp2=0,temp3=0;
cin>>c>>d>>n>>m>>k;
if(k>=n*m)
{
cout<<"0"<<endl;
return 0;
}
temp1=(n*m-k)*d;
temp2=((n*m-k)/n)*c;
temp2+=((n*m-k)%n)*d;
temp3=((n*m-k)/n)*c;
temp3+=c;
ans=min(temp1,temp2);
ans=min(ans,temp3);
cout<<ans;
return 0;
}