#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  int x, y, mx = 1e5;
  cin >> a >> b >> c >> x >> y;
  for (int k = 0; k <= 100000; k += 2) {
    int money = 2 * c * k + max(x - k, 0) * a + max(y - k, 0) * b;
    if (x - k < 0 && y - k < 0) {
      cout << mx << endl;
      return 0;
    }
    if (mx > money) {
      mx = money;
    }
  }
  cout << mx << endl;
  return 0;
}
