#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int cost[110000];
  int a = 0;
  int b = 0;
  int c = 0;
  int m = max(X, Y);
  for (int c = 0; c < m; c++) {
    if (c <= X) {
      a = X - c;
      if (c <= Y) {
        b = Y - c;
      } else {
        b = 0;
      }
    } else {
      a = 0;
    }
    cost[c] = a * A + b * B + 2 * c * C;
  }
  sort(cost, cost + m);
  cout << cost[0] << endl;
  return 0;
}
