#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.);
const long long mod = 1000000007;
inline void prep() {
  cin.tie(0);
  cin.sync_with_stdio(0);
};
int main() {
  prep();
  int c, d, n, m, k;
  cin >> c >> d >> n >> m >> k;
  int minn = 9000000;
  for (int i = 0; i <= m; i++) {
    int many = n * i + k;
    int extra = 0;
    if (many < n * m) {
      extra = n * m - many;
    }
    int problems = i * c + extra * d;
    minn = min(problems, minn);
  }
  cout << minn;
  return 0;
}
