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