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