#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a + b <= 2 * c)
    cout << x * a + y * c << endl;
  else {
    int ans1 = 2 * c * max(x, y);
    int ans2;
    if (x > y)
      ans2 = 2 * c * y + a * (x - y);
    else
      ans2 = 2 * c * x + b * (y - x);
    cout << min(ans1, ans2) << endl;
  }
}
