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