def main():

    A, B, C, X, Y = map(int, input().split())

    if A + B <= C*2:
        print(A*X+B*Y)
    elif A >= C*2 or B >= C*2:
        num_c = max(X, Y)*2
        print(C*num_c)

    else:
        num_c = min(X, Y)*2
        num_a = X - min(X, Y)
        num_b = Y - min(X, Y)
        print(A*num_a + B*num_b + C*num_c)


if __name__ == '__main__':
    main()