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