#include <bits/stdc++.h>
using namespace std;
const long long LLINF = 9223372036854775807;
const int MOD = 1000000007;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int result = 0;
  if (A + B >= C * 2) {
    if (X >= Y)
      result = C * Y + min(A, C * 2) * (X - Y);
    else
      result = C * 2 * X + min(B, C * 2) * (Y - X);
  } else
    result = A * X + B * Y;
  cout << result << endl;
  return 0;
}
