#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 = 5000000;
  for (int a = 0; a <= X; ++a) {
    for (int b = 0; b <= Y; ++b) {
      int c = 2 * max(X - a, Y - b);
      total = A * a + B * b + C * c;
      if (total < min) {
        min = total;
      }
    }
  }
  cout << total << endl;
}
