#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int f[N];
int a, b, n, m, k;
int res;
int main() {
  res = 0x3f3f3f3f;
  scanf("%d%d%d%d%d", &a, &b, &n, &m, &k);
  for (int i = 1; i <= n * m; i++) f[i] = min(f[i - n] + a, f[i - 1] + b);
  for (int i = n * m - k; i <= n * m; i++) res = min(res, f[i]);
  cout << res;
  return 0;
}
