#include <bits/stdc++.h>
using namespace std;
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 gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const int INF = 1e9;
const int MOD = 1e9 + 7;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  c *= 2;
  int ans = 0;
  if (a + b < c) {
    ans = a * x + b * y;
    cout << ans << endl;
    ;
    return 0;
  }
  if (a > c && b > c) {
    ans = c * max(x, y);
    cout << ans << endl;
    ;
    return 0;
  }
  if (x > y) {
    ans = c * y + a * (x - y);
  } else {
    ans = c * x + b * (y - x);
  }
  cout << ans << endl;
  ;
}
