#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int cost = (x + y) * max(a, b);
  int xi, yi, costi;
  for (int i = 0; i < 1e5 + 1; i++) {
    xi = x;
    yi = y;
    costi = 2 * c * i;
    xi -= i;
    yi -= i;
    if (xi >= 0 && yi >= 0)
      costi += a * xi + b * yi;
    else
      break;
    cost = min(cost, costi);
  }
  cout << cost << endl;
  return 0;
}
