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