#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using ll = long long;
const int INF = 1073741823;
const int MINF = -1073741823;
const ll LINF = ll(4661686018427387903);
const ll MOD = 1000000007;
const double PI = acos(-1);
using namespace std;
void scans(string& str) {
  char c;
  scanf("%c", &c);
  if (c == '\n') scanf("%c", &c);
  while (c != '\n' && c != -1) {
    str += c;
    scanf("%c", &c);
  }
}
double acot(double x) { return PI / 2 - atan(x); }
int main() {
  int a, b, c, x, y;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  ll cost = 0;
  ll tmp = (ll)min(x, y);
  c *= 2;
  if (a + b > c * 2) {
    cost += (ll)c * 2 * tmp;
  } else {
    cost += a * tmp;
    cost += b * tmp;
  }
  x -= tmp;
  y -= tmp;
  if (x) {
    if (x > c) {
      cost += (ll)c * (ll)x;
    } else {
      cost += (ll)a * x;
    }
  } else {
    if (y > c) {
      cost += (ll)c * (ll)y;
    } else {
      cost += (ll)b * y;
    }
  }
  printf("%lld\n", cost);
  return 0;
}
