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