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