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