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