#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long s1, s2;
  s1 = a * x + b * y;
  if (x >= y) {
    s2 = c * y * 2 + a * (x - y);
  }
  if (x < y) {
    s2 = c * x * 2 + b * (y - x);
  }
  long long ans = min(s1, s2);
  cout << ans << endl;
}
