#include <bits/stdc++.h>
int max(int a, int b) { return a < b ? b : a; }
int main(void) {
  int A, B, C, X, Y, ans = INT_MAX;
  scanf("%d%d%d%d%d", &A, &B, &C, &X, &Y);
  for (int c = 0; c <= 1000000; c++) {
    int price = A * max(X - c, 0) + B * max(Y - c, 0) + C * 2 * c;
    if (price < ans) ans = price;
  }
  printf("%d\n", ans);
}
