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