#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  c *= 2;
  long long int sum = 0;
  if (a + b > c) {
    if (x > y) {
      if (c * y + (x - y) * a > c * x) {
        sum = c * x;
      } else {
        sum = c * y + (x - y) * a;
      }
    } else if (x < y) {
      cout << c * x + (y - x) * b << " " << c * (y * 2) << endl;
      if (c * x + (y - x) * b > c * y) {
        sum = c * y;
      } else {
        sum = c * x + (y - x) * b;
      }
    } else {
      sum += sum;
    }
  } else {
    sum += a * x + b * y;
  }
  cout << sum << endl;
  return 0;
}
