#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  ll ans = 0;
  if ((a + b) < 2 * c) {
    cout << x * a + y * b << endl;
    return 0;
  }
  while (x != 0 && y != 0) {
    ans += min(a + b, 2 * c);
    x--;
    y--;
  }
  if (a > 2 * c && b > 2 * c) {
    ans += x * 2 * c;
    ans += y * 2 * c;
  } else {
    ans += x * a;
    ans += y * b;
  }
  cout << ans << endl;
}
