#include <bits/stdc++.h>
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans, rem;
  if (a + b > c * 2) {
    ans = c * 2 * min(x, y);
    if (x < y) {
      rem = y - x;
      if (y > c * 2) {
        ans += rem * c * 2;
      } else {
        ans += rem * y;
      }
    } else {
      rem = x - y;
      if (x > c * 2) {
        ans += rem * c * 2;
      } else {
        ans += rem * x;
      }
    }
  } else {
    ans = a * x + b * y;
  }
  cout << ans << endl;
}
