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