#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  long long int maior, menor;
  long long int npizzas, price;
  price = 0;
  npizzas = 0;
  cin >> a >> b >> c >> x >> y;
  if (x > y)
    maior = x;
  else
    maior = y;
  if (x < y)
    menor = x;
  else
    menor = y;
  if ((2 * c) < (a + b)) {
    if (((maior)*2) * c < (x * a) + (y * b)) {
      npizzas = (maior * 2);
      price = npizzas * c;
      cout << price << endl;
      return 0;
    } else {
      npizzas = menor * 2;
      price += (menor * 2 * c) + abs(x - y) * a;
    }
  } else {
    price = (x * a) + (y * b);
  }
  cout << price << endl;
}
