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