#include<stdio.h>
2. 
3.int main()
4.{
5.    int a,b,c,x,y,bill1,bill2,bill3;
6. 
7.    scanf("%d %d %d %d %d",&a,&b,&c,&x,&y);
8. 
9.    bill1=x*a+y*b;
10. 
11. 
12.    if(x>y)
13.    {
14.       bill2 =2*y*c+(x-y)*a;
15.    }
16.    else
17.    {
18.       bill2 =2*x*c+(y-x)*b;
19.    }
20. 
21. 
22.    if(x>y)
23.    {
24.       bill3 =2*c*x;
25.    }
26.    else
27.    {
28.       bill3 =2*c*y;
29.    }
30. 
31.    if(bill1<=bill2&&bill1<=bill3)
32.        printf("%d\n",bill1);
33.    else if(bill2<=bill1&&bill2<=bill3)
34.        printf("%d\n",bill2);
35.    else if(bill3<=bill2&&bill3<=bill1)
36.        printf("%d\n",bill3);
37. 
38.    return 0;
39.}
