#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int a, b, c, x, y;
void input() { cin >> a >> b >> c >> x >> y; }
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  input();
  if (a + b <= (2 * c)) {
    cout << a * x + b * y << endl;
  } else {
    if (min(a, b) >= c)
      cout << 2 * c * max(x, y) << endl;
    else {
      if (x < y)
        cout << 2 * c * x + b * (y - x) << endl;
      else
        cout << 2 * c * y + a * (x - y) << endl;
    }
  }
  return 0;
}
