#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1001001001;
const int MOD = 1000000007;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int mini = INF;
  for (int i = 0; i < 5000; i++) {
    for (int j = 0; j < 5000; j++) {
      int price = 0;
      int k = max((X - i) * 2, (Y - j) * 2);
      if (k < 0) continue;
      price = i * A + j * B + k * C;
      mini = min(mini, price);
    }
  }
  cout << mini << endl;
  return 0;
}
