#include <bits/stdc++.h>
using namespace std;
int Max(int x, int y) {
  if (x > y)
    return x;
  else
    return y;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int Sum = 0;
  if (a + b < 2 * c) {
    Sum = a * x + b * y;
  } else if (a > 2 * c && b > 2 * c) {
    Sum = 2 * c * Max(x, y);
  } else if (x < y) {
    Sum = 2 * x * c + (y - x) * b;
  } else {
    Sum = 2 * y * c + (x - y) * a;
  }
  cout << Sum << endl;
}
