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