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