#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y, s = 0, s2;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  s = (x + y - abs(x - y)) * c + (x > y ? a * (x - y) : b * (y - x));
  s2 = a * x + b * y;
  printf("%d", min(s, s2));
  return 0;
}
