#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long int ans = 1e9;
  for (int c = 0; c <= max(X, Y) * 2; c += 2) {
    long long int a = X - c / 2;
    long long int b = Y - c / 2;
    ans = min(ans, A * a + B * b + C * c);
  }
  cout << ans << endl;
}
