#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  C *= 2;
  int min_sum = 100000000;
  int sum = 0;
  for (int i = 0; i <= 100000; i++) {
    sum = i * 2 * C + max(0, X - i) * A + max(0, Y - i) * B;
    min_sum = min(sum, min_sum);
  }
  cout << min_sum << endl;
  return 0;
}
