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