#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long a, b, c, x, y, i = 1000000000000, j = 1000000000000,
                           k = 1000000000000, l = 1000000000000,
                           m = 1000000000000, x2, y2;
  cin >> a >> b >> c >> x >> y;
  x2 = x;
  y2 = y;
  if (a > b) {
    i = ((2 * x) * c);
    if (y > x) {
      i += (y - x) * b;
    }
  } else {
    j = ((2 * y) * c);
    if (x > y) {
      j += (x - y) * a;
    }
  }
  k = (x2 * a) + (y2 * b);
  if (x2 < y2) {
    l = ((2 * x2) * c);
    l += (y2 - x2) * b;
  } else {
    m = ((2 * y2) * c);
    m += (x2 - y2) * a;
  }
  cout << min(i, min(j, min(k, min(l, m)))) << endl;
  return 0;
}
