#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long min_sum = 1e11;
  for (int x = 0; x <= X; x++) {
    for (int y = 0; y <= Y; y++) {
      int z = 2 * max((X - x), (Y - y));
      long long sum = (int)(x * A + y * B + z * C);
      min_sum = min(min_sum, sum);
    }
  }
  cout << min_sum << endl;
  return 0;
}
