#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x < y) swap(x, y);
  while (y > 0) {
    int r = x % y;
    x = y;
    y = r;
  }
  return x;
}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int sum = 0;
  if (a + b > 2 * c) {
    if (a > 2 * c && b > 2 * c)
      sum = 2 * c * max(x, y);
    else if (a > 2 * c && b <= 2 * c) {
      sum = 2 * c * x + b * max(0, y - x / 2);
    } else if (a <= 2 * c && b > 2 * c)
      sum = a * max(0, (x - y / 2)) + 2 * c * y;
    else {
      sum = c * min(x, y) * 2 + a * (x - min(x, y)) + b * (y - min(x, y));
    }
  } else {
    sum = a * x + b * y;
  }
  cout << sum << endl;
  return 0;
}
