#include <bits/stdc++.h>
using namespace std;
struct p {
  int s;
  int e;
};
bool istrue(int a[], int b[], int n) {
  for (int i = 0; i < n; i++) {
    if (a[i] != b[i]) {
      return false;
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  int a, b, c;
  int x, y;
  cin >> a >> b >> c >> x >> y;
  long int d = 0;
  int l = abs(x - y);
  if (x > y) {
    if (a + b > 2 * c)
      d += min(x, y) * 2 * c;
    else
      d += min(x, y) * (a + b);
    if (a > 2 * c)
      d += l * 2 * c;
    else
      d += l * a;
  } else {
    if (a + b > 2 * c)
      d += min(x, y) * 2 * c;
    else
      d += min(x, y) * (a + b);
    if (b > 2 * c)
      d += l * 2 * c;
    else
      d += l * b;
  }
  cout << d;
  return 0;
}
