#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans =
      min(a * x + b * y, c * min(x, y) + (x > y ? a * (x - y) : b * (y - x)));
  cout << ans << endl;
}
