#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans1 = x * a + y * b;
  long long ans2;
  if (x >= y) {
    ans2 = y * c + (x - y) * a;
  } else {
    ans2 = x * c + (y - x) * b;
  }
  long long ans3 = max(x, y) * c;
  cout << min({ans1, ans2, ans3}) << endl;
  return 0;
}
