#include <bits/stdc++.h>
using namespace std;
long long INF = 1LL << 60;
long long mod = 1e9 + 7;
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans = INF;
  for (long long i = 0; i < (long long)(100000); ++i) {
    long long k =
        (i * c * 2) + ((max(0LL, x - i)) * a) + ((max(0LL, y - i)) * b);
    ans = min(ans, k);
  }
  cout << ans << endl;
}
