#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int sum = 1000000000;
  for (int i = 0;; i += 2) {
    int j = x - i / 2;
    int k = y - i / 2;
    int cursum = a * j + b * k + c * i;
    if (cursum < sum) sum = cursum;
    if (i / 2 > x && i / 2 > y) break;
  }
  cout << sum << endl;
  return 0;
}
