let input = readLine()!.characters.split(" ").map{Int(String($0))!}
let (A, B, C, X, Y) = (input[0], input[1], input[2], input[3], input[4])
let set1 = A*X + B*Y
let set2 = C*max(X,Y)*2
let set3 = C*min(X,Y)*2 + abs(X-Y)*(X>Y ? A:B)
print(min(set1, set2, set3))