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