#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long int price_all_A_and_B = (x * a) + (y * b);
  long long int price_minimum_AB = min(x, y) * c * 2;
  if (price_all_A_and_B < price_minimum_AB) {
    cout << price_all_A_and_B << endl;
  } else {
    if (x >= y) {
      long long int extra_A_needed = x - y;
      long long int extra_money_buy_A = a * extra_A_needed;
      long long int extra_money_buy_AB = c * 2 * extra_A_needed;
      price_minimum_AB += min(extra_money_buy_A, extra_money_buy_AB);
      cout << min(price_all_A_and_B, price_minimum_AB) << endl;
    } else {
      long long int extra_B_needed = y - x;
      long long int extra_money_buy_B = b * extra_B_needed;
      long long int extra_money_buy_AB = c * 2 * extra_B_needed;
      price_minimum_AB += min(price_all_A_and_B, extra_money_buy_AB);
      cout << min(price_all_A_and_B, price_minimum_AB) << endl;
    }
  }
  return 0;
}
