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