#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 1e4 + 10;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = INF;
  for (int i = 0; i < N; i += 2) {
    ans = min(ans, max(0, x - i / 2) * a + max(0, y - i / 2) * b + i * c);
  }
  cout << ans << endl;
  return 0;
}
