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