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