#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long a, b, c, x, y;
  while (scanf("%llu %llu %llu %llu %llu", &a, &b, &c, &x, &y) != EOF) {
    unsigned long long Min = 1000000000000;
    unsigned long long sum = 0;
    sum = sum + x * a + y * b;
    Min = min(Min, sum);
    sum = 0;
    unsigned long long b = max(x, y);
    sum = sum + 2 * b * c;
    Min = min(Min, sum);
    sum = 0;
    b = min(x, y);
    if (x > y)
      sum = sum + 2 * y * c + (x - y) * a;
    else
      sum = sum + 2 * x * c + (y - x) * c;
    Min = min(Min, sum);
    sum = 0;
    printf("%llu\n", Min);
  }
  return 0;
}
