https://www.acmicpc.net/problem/16917
import java.util.*;
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var a=s.nextInt();
var b=s.nextInt();
var c=s.nextInt();
var x=s.nextInt();
var y=s.nextInt();
var num1=a*x+b*y
var k=if(x>=y) x else y
var num2=k*2*c
var min=Math.min(num1,num2)
var w=if(a+b>=2*c) 2*c else a+b
var v=if(x>=y) y else x
x-=v
y-=v
var num3=v*w+x*a+y*b
min=Math.min(min,num3)
print(min)
}