#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
void input() {}
int main() {
  long long a, b, c, x, y, i;
  cin >> a >> b >> c >> x >> y;
  long long ans = 0x7fffffff;
  ans = min(ans, (a * x + b * y));
  ans = min(ans, 2 * max(x, y) * c);
  ans = min(ans,
            2 * min(x, y) * (c) + ((x - min(x, y)) * a + (y - min(x, y)) * b));
  return 0;
}
