#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
long long mod(long long val, long long m) {
  long long res = val % m;
  if (res < 0) res += m;
  return res;
}
long long gcd(ll a, ll b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
long long lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  c *= 2;
  ll ans = 100000000000;
  for (long long int i = 0; i < (100000); i++) {
    ans = min(ans, i * c + (max(0LL, x - i)) * a + (max(0LL, y - i)) * b);
  }
  cout << ans << endl;
  return 0;
}
