#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const int INF = 1e7;
int main() {
  int a, b, c, x, y;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  int min_xy = min(x, y);
  int sum_val = 0;
  if ((a + b) / 2 > c) {
    x -= min_xy;
    y -= min_xy;
    sum_val += 2 * c * min_xy;
  }
  sum_val += x * a + y * b;
  std::cout << sum_val << '\n';
  return 0;
}
