#include <bits/stdc++.h>
using namespace std;
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
int a, b, c, x, y;
int sums[100001];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> a >> b >> c >> x >> y;
  int a_c = 0, b_c = 0, c_c = 0;
  int min_total = 999999999;
  for (int i = 0; i < 100001; i++)
    sums[i] = (i * 2 * c) + max(0, x - i) * a + max(0, y - i) * b;
  for (int i = 0; i < 100001; i++) min_total = min(min_total, sums[i]);
  cout << min_total << "\n";
}
