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