#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll mod = 1e9 + 7;
struct edge {
  int from, to;
};
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  if (a + b < 2 * c) {
    ans = a * x + b * y;
  } else {
    if (a >= 2 * c && b >= 2 * c) {
      ans = 2 * c * max(x, y);
    } else {
      ans = 2 * c * min(x, y);
      if (x < y)
        ans += b * (y - x);
      else
        ans += a * (x - y);
    }
  }
  cout << ans << endl;
  return 0;
}
