#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int min = INT_MAX;
  int max_mix = max(X, Y) * 2;
  for (int i = 0; i < max_mix; i += 2) {
    int price = A * (X - i / 2) + B * (Y - i / 2) + C * i;
    if (price < min) min = price;
  }
  cout << min << endl;
}
