#include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long mx = max(x, y);
  long long mn = min(x, y);
  long long res = min((a * mx + b * mn), (a * (mx - mn) + 2 * mn * c));
  res = min((2 * mx * c), res);
  cout << res << endl;
  return 0;
}
