#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, d;
  long long ans = 10000000000000001;
  cin >> a >> b >> c >> x >> y;
  for (int i = 0; i <= min(x, y) * 2; i += 2)
    if (ans >= (i * c + (x - i / 2) * a + (y - i / 2) * b))
      ans = (i * c + (x - i / 2) * a + (y - i / 2) * b);
  for (int i = min(x, y) * 2; i <= max(x, y) * 2; i += 2)
    if (ans >= (i * c + (max(x, y) - i / 2) * b))
      ans = (i * c + (max(x, y) - i / 2) * b);
  cout << ans;
  system("pause");
  return 0;
}
