#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  long long ans = 1e18;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  for (int i = 0; i <= min(x, y); i++) {
    ans = min(ans, 2ll * i * c + 1ll * (x - i) * a + 1ll * (y - i) * b);
  }
  printf("%lld\n", ans);
}
