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