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