#include <stdio.h>


int main(int argc, char **argv)
{
  int a,b,c,x,y,i;
  int xxx[3];
  scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);
  if(x > y){
    xxx[0] = a * (x - y) + 2 * c * y;
    xxx[1] = a * x + b * y;
    xxx[2] = 2 * c * x;
  }
  else if(x == y){
    xxx[0] = 2 * c * x;
    xxx[1] = (a + b) * x;
    xxx[2] = 2147483647;
  }
  else{
    xxx[0] = b * (y - x) + 2 * c * x;
    xxx[1] = a * x + b * y;
    xxx[2] = 2 * c * y;
  }
  for(i = 0 ; i < 2 ; i++){
    if(xxx[i] < xxx[i + 1])
      xxx[i + 1] = xxx[i]
  }
  printf("%d\n",xxx[2]);

  return 0;
}
