#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1050000000;
const long long LINF = 1LL << 60;
const ll MOD = 1e9 + 7;
const int MINF = -1050000000;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int sum = 0;
  if (c * 2 < a + b) {
    int min_ = min(x, y);
    int re = abs(x - y);
    sum = (c * 2) * min_;
    if (a == b) {
      cout << sum << endl;
      return 0;
    }
    if (x == min_) {
      if (c * 2 < a) {
        sum += c * re * 2;
      } else
        sum += b * re;
    } else {
      if (c * 2 < a) {
        sum += c * re * 2;
      } else
        sum += a * re;
    }
  } else {
    sum = a * x + b * y;
  }
  cout << sum << endl;
  return 0;
}
