#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  int A, B, C;
  int X, Y;
  cin >> A >> B >> C >> X >> Y;
  int maxi, mini;
  bool Xbig = false;
  if (X > Y) {
    maxi = X;
    mini = Y;
    Xbig = true;
  } else {
    maxi = Y;
    mini = X;
  }
  int result = 0;
  if (2 * C < A and 2 * C < B) {
    result += maxi * 2 * C;
  } else if (2 * C < A + B) {
    result += 2 * C * mini;
    if (Xbig) {
      result += A * (maxi - mini);
    } else {
      result += B * (maxi - mini);
    }
  } else {
    result += A * X + B * Y;
  }
  cout << result << endl;
  return 0;
}
