#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  float ans = INFINITY;
  for (int cc = 0; cc <= 1000000; cc = cc + 2) {
    int aa = max(x - cc / 2, 0);
    int bb = max(y - cc / 2, 0);
    int sum = aa * a + bb * b + cc * c;
    if (sum < ans) {
      ans = sum;
    }
  }
  cout << ans << endl;
  return 0;
}
