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