#include <bits/stdc++.h>
using namespace std;
const long mod = 1e9 + 7;
const int size = 1e5;
const int inf = 1e9;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int a, b;
  if (X > Y)
    a = A * (X - Y);
  else
    a = B * (Y - X);
  if (A + B > 2 * C)
    b = min(X, Y) * 2 * C;
  else
    b = min(X, Y) * (A + B);
  cout << a + b << endl;
}
