#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans = 900000000;
  for (long long nc = 0; nc <= 2 * ((x) > (y) ? (x) : (y)); nc += 2) {
    int na = ((0) > (x - nc / 2) ? (0) : (x - nc / 2));
    int nb = ((0) > (y - nc / 2) ? (0) : (y - nc / 2));
    ans = ((ans) < (a * na + b * nb + c * nc) ? (ans)
                                              : (a * na + b * nb + c * nc));
  }
  cout << ans << endl;
}
