#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int c, d;
  cin >> c >> d;
  int n, m, k;
  cin >> n >> m >> k;
  if (n * m - k <= 0) {
    cout << 0;
    return 0;
  }
  int dp[n * m - k + 1 + n];
  dp[0] = 0;
  for (int i = 1; i < n; i++) {
    dp[i] = d * i;
  }
  for (int i = n; i <= n * m - k + n; i++) {
    dp[i] = min(dp[i - n] + c, dp[i - 1] + d);
  }
  int mini = INT_MAX;
  for (int i = n * m - k; i <= n * m - k + n; i++) {
    mini = min(mini, dp[i]);
  }
  cout << mini;
}
