#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, ab, x, y, l, ans = 0;
  cin >> a >> b >> ab >> x >> y;
  if (a > ab && b > ab)
    l = 2;
  else if (a + b > ab * 2)
    l = 1;
  else
    l = 0;
  if (l == 2) {
    ans = max(x, y) * ab * 2;
  }
  if (l == 1) {
    if (x <= y) {
      ans = ab * x * 2 + b;
    } else {
      ans = ab * y * 2 + a;
    }
  }
  if (l == 0) {
    ans = a * x + b * y;
  }
  cout << ans << endl;
  return 0;
}
