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