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