#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  int m = 500000000;
  scanf("%d%d%d%d%d", &A, &B, &C, &X, &Y);
  for (int i = 0; i < 2500; i++) {
    m = min(i * 2 * C + max(0, X - i) * A + max(0, Y - i) * B, m);
  }
  printf("%d", m);
  return 0;
}
