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