#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans1 = A * X + B * Y;
  int ans2 = X >= Y ? A * (X - Y) + C * Y * 2 : C * X * 2 + B * (Y - X);
  cout << min(ans1, ans2) << endl;
  return 0;
}
