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