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