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