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