#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  static const double pi = 3.141592653589793;
  int a, b, c, x, y, ans;
  cin >> a >> b >> c >> x >> y;
  if (a + b > c * 2) {
    if (x < y) {
      ans = c * 2 * x + (y - x) * b;
    } else {
      ans = c * 2 * y + (x - y) * a;
    }
  } else {
    ans = a * x + b * y;
  }
  cout << ans << endl;
}
