#include <bits/stdc++.h>
using namespace std;
int min(int x, int y, int z) {
  if (x > y) {
    return y > z ? z : y;
  } else {
    return x > z ? z : x;
  }
}
int main() {
  int a, b, c, x, y;
  int dp[10001];
  cin >> a >> b >> c >> x >> y;
  int temp;
  for (int i = 0; i <= x; i++) {
    for (int j = 0; j <= y; j++) {
      if (i == 0) {
        dp[j] = j * b;
        continue;
      }
      if (j == 0) {
        temp = dp[j];
        dp[j] = i * a;
        continue;
      }
      int temp = dp[j];
      dp[j] = min(dp[j - 1] + b, dp[j] + a, temp + 2 * c);
    }
  }
  int ans = dp[y];
  cout << ans << endl;
  return 0;
}
