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