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