#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000007;
const int mod = 1000000007;
const double PI = 3.14159265358979323846;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int mid = C * 2;
  int M = max(X, Y), m = min(X, Y);
  if (X > Y)
    cout << min(min(Y * mid + (X - Y) * A, M * mid), A * X + B * Y) << endl;
  else
    cout << min(min(X * mid + (Y - X) * A, M * mid), A * X + B * Y) << endl;
  return 0;
}
