#include <bits/stdc++.h>
using namespace std;
using ll long long;
int main(void) {
  ll i, A, B, C, x, y, answer=5000000000, result;
  cin >> A >> B >> C >> x >> y;
  for (i=1; i <= 100000; ++i) {
    result = i*2C+max(0, x-i)*A+max(0, y-i)*B;
    answer = min(answer, result);
  }
  cout << answer << endl;
  return 0;
}