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