#include <bits/stdc++.h>
int main() {
  int A, B, C, X, Y, p, q;
  scanf("%d %d %d %d %d", &A, &B, &C, &X, &Y);
  p = (A * X) + (B * Y);
  if (X < Y || X == Y)
    q = (2 * Y * C);
  else
    q = (2 * X * C);
  if (p > q)
    printf("%d\n", q);
  else
    printf("%d\n", p);
  return 0;
}
