#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  if (a > 2 * c && b > 2 * c) {
    if (x > y)
      printf("&d", c * 2 * x);
    else
      printf("%d", c * 2 * y);
  } else if (a + b > 2 * c) {
    if (x > y)
      printf("%d", (c * 2 * y) + (x - y) * a);
    else
      printf("%d", (c * 2 * x) + ((y - x) * b));
  } else {
    printf("%d", a * x + b * y);
  }
  return 0;
}
