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