https://www.acmicpc.net/problem/16917
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int a=s.nextInt();
int b=s.nextInt();
int c=s.nextInt();
int x=s.nextInt();
int y=s.nextInt();
int num1=a*x+b*y;
int k=x>=y?x:y;
int num2=k*2*c;
int min=Math.min(num1,num2);
int w=(a+b)>=2*c?2*c:a+b;
int v=x>=y?y:x;
x-=v;
y-=v;
int num3=v*w+x*a+y*b;
min=Math.min(min,num3);
System.out.print(min);
}
}