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