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