#include <bits/stdc++.h>
using namespace std;
int main() {
  int A = 0, B = 0, C = 0, X = 0, Y = 0, i = 0, j = 0;
  cin >> A >> B >> C >> X >> Y;
  int low_cost = A * X + B * Y;
  for (int k = 0; k <= X * 2 || k <= Y * 2; k++) {
    if (k % 2) {
      i = X - (k - 1) / 2;
      j = Y - (k - 1) / 2;
    } else {
      i = X - k / 2;
      j = Y - k / 2;
    }
    if (low_cost > i * A + j * B + k * C) {
      low_cost = i * A + j * B + k * C;
    }
  }
  cout << low_cost;
}
