#include <bits/stdc++.h>
int main() {
  int a, b, c, x, y;
  long ans;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  int minval, maxpie;
  minval = ((a > b) ? b : a);
  if (minval == a) {
    maxpie = y;
  } else {
    maxpie = x;
  }
  if (maxpie * (a + b) > 2 * maxpie * c) {
    if (minval < c) {
      ans = 2 * maxpie * c + abs(x - y) * minval;
    } else {
      if (maxpie == ((x < y) ? y : x)) {
        ans = 2 * maxpie * c;
      } else {
        ans = 2 * maxpie * c + abs(x - y) * c;
      }
    }
  } else {
    ans = a * x + b * y;
  }
  printf("%ld", ans);
  return 0;
}
