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