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