#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int priceA = x * 2 * c;
  priceA += (y - x) * b;
  int priceB = y * 2 * c;
  priceB += (x - y) * a;
  int priceC = x * a + y * b;
  cout << min({priceA, priceB, priceC}) << "\n";
}
