import math

def main():
    A,B,C,X,Y = [int(x) for x in input().split()]
    ans = 0
    if A>C*2 and B>C*2:
        # print('a')
        ans = C*max(X,Y)*2
    elif A+B <= C*2:
        # print('b')
        ans = A*X + B*Y
    else:
        if X<=Y:
            # print('c')
            ans = C*X*2 + B*(Y-X)
        elif X>Y:
            # print('d')
            ans = C*Y*2 + A*(X-Y)
    print(ans)

if __name__ == '__main__':
    main()