#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
using namespace std::chrono;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using vi = vector<int>;
using vvi = vector<vi>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vc = vector<char>;
using vvc = vector<vc>;
using vb = vector<bool>;
using vvb = vector<vb>;
class Timer {
 public:
  Timer() : start_(system_clock::now()) {}
  double elapsed() const {
    duration<double> d = system_clock::now() - start_;
    return d.count();
  }

 private:
  system_clock::time_point start_;
};
template <int N>
class UnionFind {
 public:
  UnionFind() : parent(N) {
    for (int i = (0); i < (N); ++i) parent[i] = i;
  }
  bool isSame(int A, int B) { return root(A) == root(B); }
  void unite(int A, int B) {
    A = root(A);
    B = root(B);
    if (A != B) {
      parent[B] = A;
    }
  }

 private:
  vi parent;
  int root(int x) {
    if (parent[x] == x) {
      return x;
    } else {
      return parent[x] = root(parent[x]);
    }
  }
};
template <typename T>
bool isInclude(T l, T v, T r) {
  return l < v && v < r;
}
template <typename T>
bool isPrime(T n) {
  T i;
  if (n < 2)
    return false;
  else if (n == 2)
    return true;
  if (n % 2 == 0) return false;
  for (i = 3; i <= n / i; i += 2)
    if (n % i == 0) return false;
  return true;
}
template <typename TYPE, std::size_t SIZE>
std::size_t array_length(const TYPE (&array)[SIZE]) {
  return SIZE;
}
class Solver {
 public:
  Solver(istream& i, ostream& o) : cin(i), cout(o) {}
  int solve() {
    int A;
    cin >> A;
    ;
    int B;
    cin >> B;
    ;
    int C;
    cin >> C;
    ;
    int X;
    cin >> X;
    ;
    int Y;
    cin >> Y;
    ;
    int result = 0;
    int rem = abs(X - Y);
    if (A + B > C * 2) {
      if (X > Y) {
        result += Y * C * 2;
        if (A > C * 2) {
          result += rem * C * 2;
        } else {
          result += rem * A;
        }
      } else {
        result += X * C * 2;
        if (B > C * 2) {
          result += rem * C * 2;
        } else {
          result += rem * B;
        }
      }
    }
    cout << result << endl;
    return 0;
  }

 private:
  istream& cin;
  ostream& cout;
};
int main(int argv, char* argc[]) {
  Solver s(cin, cout);
  return s.solve();
}
