#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  scanf("%d%d%d%d%d", &a, &b, &c, &x, &y);
  int ans = 0;
  if (a + b > c * 2) {
    if ((x + y) % 2 == 0)
      ans = max(x, y) * 2 * c;
    else {
      ans = ((x + y) / 2) * 2 * c;
      if (x > y)
        ans += (x - y) * a;
      else
        ans += (y - x) * b;
    }
  } else
    ans = a * x + b * y;
  printf("%d\n", ans);
}
