#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long d = 10e9;
  long long k;
  x *= 2;
  y *= 2;
  for (long long i = 0; i < (long long)(max(x, y)); i++) {
    k = i * c + a * max((long long)0, (x - i + 1) / 2) +
        b * max((long long)0, (y - i + 1) / 2);
    d = min(d, k);
  }
  cout << d;
}
