#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
constexpr int INF = 2147483647;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
template <typename T>
struct Point2D {
  T x;
  T y;
  friend ostream& operator<<(ostream& os, const Point2D<T>& point);
  bool operator<(const Point2D& right) const {
    return (this->x == right.x) ? (this->y > right.y) : (this->x > right.x);
  }
};
ostream& operator<<(ostream& os, const Point2D<int>& point) {
  os << "(" << point.x << ',' << point.y << ")";
  return os;
}
template <class T>
using StdAlloc = std::allocator<T>;
template <class T>
unsigned long long UniqueElementNum(const vector<T>& data) {
  auto copy = data;
  sort(begin(copy), end(copy));
  copy.erase(unique(begin(copy), end(copy)), end(copy));
  return copy.size();
}
template <class T>
bool IsIncludeOpen(T x, T min, T max) {
  return (min < x && x < max);
}
template <class T>
bool IsIncludeClose(T x, T min, T max) {
  return (min <= x && x <= max);
}
long long gcd(long long a, long long b) {
  long long c;
  if (a < b) {
    a += b;
    b = a - b;
    a -= b;
  }
  while (b != 0) {
    c = a % b;
    a = b;
    b = c;
  }
  return a;
}
bool IsPrime(ULL num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (ULL i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
void DecomposePrime(ULL n, vector<tuple<ULL, ULL>>& result) {
  vector<ULL> primeList;
  ULL a = 2;
  while (n >= a * a) {
    if (n % a == 0) {
      primeList.emplace_back(a);
      n /= a;
    } else {
      a++;
    }
  }
  primeList.emplace_back(n);
  set<ULL> uniquePrimeList(begin(primeList), end(primeList));
  for (const auto& p : uniquePrimeList) {
    ULL primeNum = count(begin(primeList), end(primeList), p);
    result.emplace_back(make_tuple(p, primeNum));
  }
}
template <typename Type>
Type nCr(Type n, Type r) {
  Type ans = 1;
  for (Type i = n; i > n - r; --i) {
    ans = ans * i;
  }
  for (Type i = 1; i < r + 1; ++i) {
    ans = ans / i;
  }
  return ans;
}
template <class Num, class Container>
void InitContainer(Num num, Container& container) {
  container.resize(num);
  for (auto& d : container) {
    cin >> d;
  }
}
template <class Num,
          template <class T, class Allocator = StdAlloc<T>> class Container,
          class T2>
void InitContainer(Num num, Container<Point2D<T2>>& firstContainer) {
  firstContainer.resize(num);
  for (auto& d : firstContainer) {
    cin >> d.x >> d.y;
  }
}
template <class Num, class First, class... Rest>
void InitContainer(Num num, First& first, Rest&... rest) {
  InitContainer(num, first);
  InitContainer(num, rest...);
}
template <class Num, class... Container>
void InitNumAndContainer(Num& num, Container&... container) {
  cin >> num;
  InitContainer(num, container...);
}
template <template <class T, class Allocator = StdAlloc<T>> class Container,
          class T>
void ShowContainer(const Container<T>& container) {
  ostream_iterator<T> outItr(cout, "\n");
  copy(container.begin(), container.end(), outItr);
  cout << endl;
}
int main() {
  long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  ULL value = 0;
  if (X == 1 && Y == 1) {
    value += X * A + Y * B;
  } else if (X == 1 && Y == 2) {
    value += min(A + B * 2, C * 2);
  } else if (X == 2 && Y == 1) {
    value += min(A * 2 + B, C * 2);
  } else if (A >= C && B >= C) {
    value += max(X, Y) * (C * 2);
  } else if (A + B >= C * 2) {
    long minPizzaNum = min(X, Y);
    value += min(X, Y) * (C * 2);
    value += abs(X - Y) * (minPizzaNum == X) ? B : A;
  } else {
    value += X * A + Y * B;
  }
  cout << value;
  return 0;
}
