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