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