#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, ab, x, y;
  cin >> a >> b >> ab >> x >> y;
  ab *= 2;
  int m = max(x, y);
  int tmpa = a * x;
  int tmpb = b * y;
  int sum = tmpa + tmpb;
  int sum_ab = 0;
  if (m % 2 == 0) {
    sum_ab = ab * m;
    if (sum > sum_ab) sum = sum_ab;
  } else {
    sum_ab = ab * (m - 1);
    if (x < y)
      sum_ab += b;
    else
      sum_ab += a;
    if (sum > sum_ab) sum = sum_ab;
  }
  cout << sum << endl;
  return 0;
}
