#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long res = (1 << 29);
  for (int i = 0; i < 100001; i++) {
    long long now;
    now = i * 2 * C + max(0, (X - i)) * A + max(0, (Y - i)) * B;
    if (res > now) res = now;
  }
  cout << res << endl;
  return 0;
}
