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