#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;
  int d = 0;
  if (a + b > 2 * c) {
    if (x == 0 || y == 0) {
      if (x != 0) {
        if (a > 2 * c)
          d += 2 * c * x;
        else
          d += x * a;
      } else {
        if (b > 2 * c)
          d += 2 * c * y;
        else
          d += y * b;
      }
    } else {
      d += min(x, y) * 2 * c;
      if (x > y) {
        int l = x - y;
        if (a > 2 * c)
          d += 2 * c * l;
        else
          d += l * a;
      } else if (x < y) {
        int l = y - x;
        if (b > 2 * c)
          d += 2 * c * l;
        else
          d += l * b;
      }
    }
  } else {
    d += x * a + y * b;
  }
  cout << d;
  return 0;
}
