#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 500000000;
  int c2 = c * 2;
  for (int k = 0; k < (int)(max(x, y) + 1); k++) {
    ans = min(c2 * k + max(x - k, 0) * a + max(y - k, 0) * b, ans);
  }
  cout << ans << endl;
}
