#include <bits/stdc++.h>
using namespace std;
int min(int a, int b) {
  if (a > b)
    return b;
  else
    return a;
}
int main() {
  int a, b, c, x, y, res;
  cin >> a >> b >> c >> x >> y;
  if ((a + b) <= 2 * c)
    res = x * a + y * b;
  else {
    if (x > y)
      res = 2 * c * y + a * (x - y);
    else
      res = 2 * c * x + b * (y - x);
  }
  cout << res;
  return 0;
}
