#include <bits/stdc++.h>
int main() {
  long int A, B, C, X, Y;
  scanf("%ld %ld %ld %ld %ld", &A, &B, &C, &X, &Y);
  long int ans = X < Y               ? X
                 : Y * 2 * C < A + B ? 2 * C
                                     : A + B + A * (X - X < Y ? X : Y) +
                                           B * (Y - X < Y ? X : Y);
  printf("%ld", ans);
  return 0;
}
