#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 1;
const int MOD = 1e9 + 7;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  return b ? gcd(b, a % b) : a;
}
int s2i(string num) {
  stringstream ss;
  ss << num << flush;
  int n;
  ss >> n;
  return n;
}
string i2s(int n) {
  stringstream ss;
  ss << n << flush;
  return ss.str();
}
long long A, B, C, X, Y;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  cin >> A >> B >> C >> X >> Y;
  if (2 * C >= A + B) {
    cout << A * X + B * Y << endl;
    return 0;
  }
  if (X >= Y) {
    cout << Y * 2 * C + (X - Y) * A << endl;
  } else {
    cout << X * 2 * C + (Y - X) * B << endl;
  }
  return 0;
}
