#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  int num = 0;
  cin >> A >> B >> C >> X >> Y;
  if (A + B < 2 * C)
    num = A * X + B * Y;
  else {
    int sum = min(X, Y);
    C = C * 2;
    num = C * sum;
    if (C < A || C < B)
      num = max(X, Y) * C;
    else
      num = num + A * (X - sum) + B * (Y - sum);
  }
  cout << num << endl;
  return 0;
}
