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