#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int m = max(x, y);
  int ans = 0;
  for (int i = 0; i <= m; i++) {
    for (int j = m - i; j >= i; j--) {
      int k = (a + b) * i + c * 2 * j;
      if (ans > k) ans = k;
    }
  }
  cout << ans << endl;
}
