#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int keta(ll x) {
  int count = 0;
  while (x) {
    x /= 10;
    count++;
  }
  return count;
}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ab = 2 * c;
  int cost = 100000000;
  for (int i = 0; i <= 100000; i++) {
    int temp = 0;
    temp += i * ab + max(x - i, 0) * a + max(y - i, 0) * b;
    cost = min(temp, cost);
  }
  cout << cost << endl;
  return 0;
}
