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