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