#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  ll sol = min(x, y) * 2 * c;
  if (x > y)
    sol += (x - y) * a;
  else
    sol += (y - x) * b;
  sol = min(sol, x * a + y * b);
  cout << sol;
}
