#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  vector<vector<long long>> dp(10010, vector<long long>(10010, 1e9));
  dp[0][0] = 0;
  for (int i = 0; i < (10000); ++i)
    for (int j = 0; j < (10000); ++j) {
      if (dp[i][j] == 1e9) continue;
      dp[i + 1][j] = min(dp[i + 1][j], dp[i][j] + a);
      dp[i][j + 1] = min(dp[i][j + 1], dp[i][j] + b);
      dp[i + 1][j + 1] = min(dp[i + 1][j + 1], dp[i][j] + c * 2);
    }
  long long ans = 1e9;
  for (int i = x; i < 10010; i++) {
    for (int j = y; j < 10010; j++) {
      ans = min(ans, dp[i][j]);
    }
  }
  cout << ans << endl;
  return 0;
}
