#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  int a, b, c, x, y;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  int ab = min(a + b, 2 * c);
  int mn = min(x, y);
  long long res = mn * ab;
  x -= mn;
  y -= mn;
  if (x > 0) res += x * a;
  if (y > 0) res += y * b;
  printf("%lld\n", res);
  return 0;
}
