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