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