#include <bits/stdc++.h>
using namespace std;
const double pi =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int mod = 1000000007;
int main() {
  long long int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a > c && b > c && x > y)
    cout << c * 2 * x;
  else if (a > c && b > c && x < y)
    cout << c * 2 * y;
  else if ((a + b) / 2 > c && x > y)
    cout << y * 2 * c + (x - y) * a;
  else if ((a + b) / 2 > c && x < y)
    cout << x * 2 * c + (y - x) * b;
  else if ((a + b) / 2 > c && x == y)
    cout << c * 2 * x;
  else
    cout << a * x + b * y;
  return 0;
}
