#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long int ans = a * x + b * y;
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < y; j++) {
      if ((x - i) == (y - j)) {
        long long int sum = i * a + j * b + ((x - i) + (y - j)) * c;
        ans = min(ans, sum);
      }
    }
  }
  cout << ans << endl;
}
