#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int maxp = max(x, y);
  int minp = min(x, y);
  int sum = 0;
  for (int i = 0; i < 2 * minp; i++) {
    sum += c;
  }
  if (maxp != minp) {
    for (int i = 0; i < maxp - minp; i++) {
      if (maxp == x)
        sum += a;
      else
        sum += b;
    }
  }
  int suml = 0;
  for (int i = 0; i < (int)(x); i++) suml += a;
  for (int i = 0; i < (int)(y); i++) suml += b;
  cout << min(sum, suml);
}
int main() {
  cout << std::fixed << std::setprecision(10);
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
}
