#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, price;
  cin >> a >> b >> c >> x >> y;
  int min_price = x * a + y * b;
  for (int i = 0; i <= x; i++) {
    for (int j = 0; j <= y; j++) {
      int k = 2 * max((x - i), (y - j));
      price = i * a + j * b + k * c;
      if (price < min_price) min_price = price;
    }
  }
  cout << min_price << endl;
  return 0;
}
