#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
signed main() {
  long long c, d, n, m, k;
  cin >> c >> d >> n >> m >> k;
  if (n * m <= k) {
    cout << 0 << endl;
    return 0;
  }
  long long ans = 0;
  long long p = (n * m - k) / n;
  long long rem = (n * m - k) - p * n;
  cerr << "p"
       << ": " << p << endl;
  ;
  cerr << "c"
       << ":" << c << " "
       << "n * d"
       << ":" << n * d << endl;
  ;
  cerr << "rem"
       << ": " << rem << endl;
  ;
  ans += min(c, n * d) * p;
  ans += min(c, rem * d);
  cout << ans << endl;
}
