#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  long ans;
  scanf("%ld%ld%ld%ld%ld", &a, &b, &c, &x, &y);
  ans = a * x + b * y;
  for (int i = 0; i <= max(x, y) * 2; i += 2) {
    ans =
        min((long)max((x - i / 2), 0) * a + max((y - i / 2), 0) * b + i * c * 2,
            ans);
  }
  printf("%ld", ans);
}
