#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long sum[10] = {};
  sum[0] = 2 * c * max(x, y);
  sum[1] = a * x + b * y;
  if (x > y) {
    sum[2] = y * 2 * c + (x - y) * a;
  } else if (y > x) {
    sum[2] = x * 2 * c + (y - x) * b;
  }
  long long mi = sum[0];
  for (int i = 0; i < (3); i++) {
    mi = min(sum[i], mi);
  }
  cout << mi << endl;
}
