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