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