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