#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  int ans = 1000000000;
  cin >> A >> B >> C >> X >> Y;
  for (int i = 0; i < max(X, Y) + 1; i++) {
    int a = X - i;
    int b = Y - i;
    if (a < 0) a = 0;
    if (b < 0) b = 0;
    ans = min(ans, i * C + a * A + b * B);
  }
  cout << ans;
}
