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