#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e10;
int a, b, c, x, y, tmp;
vector<int> m(105);
int main() {
  cin >> a >> b >> c >> x >> y;
  if (c < a && c < b)
    cout << max(x, y) * 2 * c << endl;
  else {
    if (x > y) {
      tmp = y;
      y = x;
      x = tmp;
      tmp = b;
      b = a;
      a = tmp;
    }
    cout << min(min(y * 2 * c, x * a + y * b), x * 2 * c + (y - x) * b) << endl;
  }
  return 0;
}
