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