#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long temp1 = 0;
  temp1 = a * x + b * y;
  if (x < y) swap(x, y);
  long long temp2 = 0;
  temp2 = x * 2 * c;
  long long temp3 = 0;
  long long temp4 = 0;
  temp3 = y * 2 * c + (x - y) * a;
  temp4 = y * 2 * c + (x - y) * 2 * c;
  temp3 = min(temp3, temp4);
  cout << min(temp3, min(temp1, temp2));
  return 0;
}
