#include <bits/stdc++.h>
using namespace std;
int main() {
  int c, d, n, m, k;
  cin >> c >> d >> n >> m >> k;
  m = max(0, n * m - k);
  cout << (c < n * d ? min((m + n - 1) / n * c, m / n * c + m % n * d) : m * d);
}
