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