#include <bits/stdc++.h>
using namespace std;
int main() {
  long long c, d, n, m, k;
  cin >> c >> d >> n >> m >> k;
  if (k >= n * m) {
    cout << "0";
    return 0;
  } else {
    long long t = (n * m - k);
    long long second, j, i;
    if (t % n == 0)
      second = (t / n) * c;
    else
      second = ((t / n) + 1) * c;
    j = d * (t);
    i = d * (t % n) + c * (t / n);
    cout << min(second, min(i, j));
  }
}
