#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = INT_MAX / 3, tmp;
  if (x < y) swap(a, b), swap(x, y);
  for (int i = (int)(0); i < (int)(x + 1); i++) {
    tmp = a * i + (x - i) * c * 2 + max(0, y - (x - i)) * b;
    ans = min(ans, tmp);
  }
  cout << ans << endl;
  return 0;
}
