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