#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  while (~scanf("%d%d%d", &a, &b, &c)) {
    long long int d, sum = 10000000000, con[6];
    scanf("%d%d", &x, &y);
    con[0] = a * x + b * y;
    con[1] = 2 * y * c + abs(x - y) * a;
    con[2] = 2 * x * c + abs(y - x) * a;
    d = x > y ? x : y;
    con[3] = 2 * d * c;
    con[4] = a * x + b * y;
    for (int i = 0; i < 5; i++) {
      if (con[i] < sum) sum = con[i];
    }
    printf("%lld\n", sum);
  }
  return 0;
}
