#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  int min_ = min(x, y);
  if (a + b < 2 * c) {
    ans += min_ * (a + b);
  } else {
    ans += min_ * 2 * c;
  }
  if ((x - min_) * a + (y - min_) * b < 2 * c) {
    ans += (x - min_) * a + (y - min_) * b;
  } else {
    ans += (x - min_) * 2 * c + (y - min_) * 2 * c;
  }
  cout << ans << endl;
  ;
}
