#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  bool first = true;
  int current = 0;
  for (int x = 0; x <= X; x++) {
    for (int y = 0; y <= Y; y++) {
      int x1 = X - x;
      int y1 = Y - y;
      int z = max(x1, y1) * 2;
      int total = A * x + B * y + C * z;
      if (first) {
        first = false;
        current = total;
      } else {
        if (total < current) {
          current = total;
        }
      }
    }
  }
  cout << current << endl;
  return 0;
}
