#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
int main() {
  int a, b, c;
  int x, y;
  cin >> a >> b >> c >> x >> y;
  ll ans = a * x + b * y;
  for (int i = 2; i <= 100000; i += 2) {
    if (x > 0 && y > 0) x--;
    y--;
    ll h = x * a + y * b + c * i;
    ans = min(ans, h);
  }
  cout << ans << endl;
  return 0;
}
