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