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