#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using T = tuple<string, int, int>;
const ll INF = 1LL << 60;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = 999999999;
  int mx = max(X, Y);
  mx *= 2;
  for (int i = 0; i <= mx; i++) {
    int x = X - (i / 2), y = Y - (i / 2);
    if (x < 0) x = 0;
    if (y < 0) y = 0;
    int temp = x * A + y * B + i * C;
    ans = min(ans, temp);
  }
  cout << ans << endl;
  return 0;
}
