#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int min = 999999999;
  int val = 0;
  for (int i = 0; i <= X; i++) {
    int j = Y - (X - i);
    if (j < 0) continue;
    val = (A * i) + (B * j) + ((X - i) * 2 * C);
    if (min > val) min = val;
  }
  cout << min << endl;
  return 0;
}
