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