#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 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++) {
    int prime = (i * 2 * c) + max(0, (x - i) * a) + max(0, (y - i) * b);
    min_total = min(min_total, prime);
  }
  cout << min_total << "\n";
}
