#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 2147483647;
int main() {
  int A, B, C;
  cin >> A >> B >> C;
  int X, Y;
  cin >> X >> Y;
  int ans = INF;
  for (int c = 0; X - c / 2 >= 0 && Y - c / 2 >= 0; c += 2) {
    int a = X - c / 2;
    int b = Y - c / 2;
    int tmp = a * A + b * B + c * C;
    ans = min(ans, tmp);
  }
  cout << ans << endl;
  ;
  return 0;
}
