#include <bits/stdc++.h>
int max(int b, int c) {
  int max1;
  if (b > c) max1 = c;
  if (c > b) max1 = b;
  return max1;
}
int main() {
  int r, l, s = 0, s1 = 0, a, b, c, x, y, m;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  if (x == y) s1 = (x)*c;
  s = x * a + y * b;
  if (y > x) {
    l = y - x;
    y = y - l;
    s1 = y * l + (y + x) * c;
  }
  if (x > y) {
    r = x - y;
    x = x - r;
    s1 = r * a + (y + x) * c;
  }
  m = max(s, s1);
  printf("%d ", m);
  return 0;
}
