#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long int, long long int> a,
          pair<long long int, long long int> b) {
  if (a.first == b.first) {
    if (a.second <= b.second)
      return true;
    else
      return false;
  }
  if (a.first > b.first)
    return true;
  else
    return false;
}
bool compa(pair<string, pair<int, int>> a, pair<string, pair<int, int>> b) {
  if (a.first == b.first) {
    if (a.second.first > b.second.first)
      return true;
    else
      return false;
  }
  if (a.first < b.first)
    return true;
  else
    return false;
}
long long int gcd(long long int bdda, long long int chota) {
  if (chota == 0) return bdda;
  return gcd(chota, bdda % chota);
}
void solve() {
  long long int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a / 2 + b / 2 <= c)
    cout << x * a + y * b << endl;
  else {
    long long int m = min(x, y), ans = 0;
    {
      ans += 2 * m * c;
      x -= m, y -= m;
    }
    if (x == 0) {
      if (b * y > y * 2 * c)
        ans += 2 * c * y;
      else
        ans += b * y;
    } else {
      if (x * a > x * 2 * c)
        ans += 2 * c * x;
      else
        ans += a * x;
    }
    cout << ans;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
