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