#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
int main() {
  int a, b, c;
  int x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 999999999;
  for (int i = 0; i < 100000; i++) {
    ans = min(ans, i * 2 * c + max(0, x - i) * a + max(0, y - i) * b);
  }
  cout << ans << endl;
}
