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