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