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