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