#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX = 510000;
const int INF = 1e9;
const double pi = acos(-1);
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans = 0;
  if (x == y) {
    if (2 * c <= a && 2 * c <= b) {
      ans = x * 2 * c;
    }
    if (2 * c > a && 2 * c > b) {
      ans = a * x + b * y;
    }
    if (2 * c > a && 2 * c <= b) {
      ans = INF;
      for (long long i = 0; i < (x + 1); i++) {
        ans = min(2 * c * i + (x - i) * a, ans);
      }
    }
    if (2 * c <= a && 2 * c > b) {
      ans = INF;
      for (long long i = 0; i < (x + 1); i++) {
        ans = min(2 * c * i + (y - i) * b, ans);
      }
    }
  }
  if (x > y) {
    ans = y * min(a, 2 * c) + y * min(b, 2 * c);
    x -= y;
    ans += min(a * x, x * 2 * c);
  }
  if (x < y) {
    ans = min((a + b) * x, x * 2 * c);
    y -= x;
    ans += min(b * y, y * 2 * c);
  }
  cout << ans << endl;
  return 0;
}
