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