#include <bits/stdc++.h>
using namespace std;
int A, B, C;
long X, Y;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> A >> B >> C >> X >> Y;
  long long sum = 0;
  if ((A + B) / 2 > C) {
    long large = X > Y ? X : Y;
    sum += C * large * 2;
  } else {
    sum += A * X + B * Y;
  }
  cout << sum << endl;
}
