#include <bits/stdc++.h>
using namespace std;
const long long INF = 100000000000000000;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long hoge = 0;
  long long min = INF;
  for (int i = 0; i <= max(x, y); ++i) {
    hoge = 2 * c * i + a * (x - i) + b * (y - i);
    if (min > hoge) min = hoge;
  }
  cout << min << endl;
  return 0;
}
