#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int A, B, C, X, Y, val, min, max, ans;
  cin >> A >> B >> C >> X >> Y;
  if (X <= Y) {
    min = X;
    max = Y;
  } else {
    min = Y;
    max = X;
  }
  ans = A * X + B * Y + C * (2 * X + 2 * Y);
  for (int i = 0; i <= max; i++) {
    val = C * 2 * i;
    if (X > i) {
      val += (X - i) * A;
    }
    if (Y > i) {
      val += (Y - i) * B;
    }
    if (ans >= val) ans = val;
  }
  cout << val;
}
