#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int sum[5] = {0, 0, 0, 0, 0};
  int a1 = a / 2, b1 = b / 2;
  sum[1] += a1 * 2 * x + b1 * 2 * y;
  if (y > x)
    sum[2] += c * 2 * x + (y - x) * b;
  else
    sum[2] += c * 2 * y + (x - y) * a;
  if (y > x)
    sum[3] += 2 * y * c;
  else
    sum[3] += 2 * x * c;
  sort(sum + 1, sum + 4);
  cout << sum[1];
  return 0;
}
