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