#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int total = 0;
  int min_sum = 100000000;
  for (int i = 0; i < X; i++) {
    for (int j = 0; j < Y; j++) {
      int sum = 0;
      int k = max((X - i) * 2, (Y - j) * 2);
      sum = A * i + B * j + C * k;
      min_sum = min(min_sum, sum);
    }
  }
  cout << min_sum << endl;
  return 0;
}
