#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void) {
  int a, b, c;
  int x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b <= c * 2) {
    cout << a * x + b * y << endl;
    return 0;
  }
  int ans = 0;
  if (x >= y) {
    ans += 2 * c * y;
    if (2 * a <= c * 2) {
      ans += a * (x - y);
    } else {
      ans += 2 * c * (x - y);
    }
  } else {
    ans += 2 * c * x;
    if (2 * b <= c * 2) {
      ans += b * (y - x);
    } else {
      ans += 2 * c * (y - x);
    }
  }
  cout << ans << endl;
  return 0;
}
