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