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