#include <bits/stdc++.h>
using namespace std;
void readint(long long N, vector<long long> &a);
void readdouble(long long N, vector<double> &a);
void readindex(long long N, vector<long long> &a);
signed main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long MAX_N = 100000;
  long long ans = MAX_N * 50000;
  long long a, b, v;
  for (long long c2 = (0); c2 < (MAX_N); c2++) {
    a = max((long long)0, X - c2);
    b = max((long long)0, Y - c2);
    v = a * A + b * B + 2 * c2 * C;
    if (v < ans) ans = v;
  }
  cout << ans;
  return 0;
}
void readint(long long N, vector<long long> &a) {
  string s;
  for (long long i = 0; i < N - 1; i++) {
    getline(cin, s, ' ');
    a[i] = atoi(s.c_str());
  }
  getline(cin, s, '\n');
  a[N - 1] = atoi(s.c_str());
}
void readdouble(long long N, vector<double> &a) {
  string s;
  for (long long i = 0; i < N - 1; i++) {
    getline(cin, s, ' ');
    a[i] = atof(s.c_str());
  }
  getline(cin, s, '\n');
  a[N - 1] = atof(s.c_str());
}
void readindex(long long N, vector<long long> &a) {
  string s;
  for (long long i = 0; i < N - 1; i++) {
    getline(cin, s, ' ');
    a[i] = atoi(s.c_str()) - 1;
  }
  getline(cin, s, '\n');
  a[N - 1] = atoi(s.c_str()) - 1;
}
