#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int64_t value = 0;
  value = (A * X) + (B * Y);
  for (int i = X; i >= 0; i--) {
    for (int j = Y; j >= 0; j--) {
      int64_t tmp_value = (A * i) + (B * j);
      int64_t tmp = C * max((X - i), (Y - j)) * 2;
      tmp_value = tmp_value + tmp;
      value = min(value, tmp_value);
    }
  }
  cout << value << endl;
}
