#!/usr/bin/env python3

import sys, math, fractions, itertools





def solve(A: int, B: int, C: int, X: int, Y: int):

    mn = 1e9

    for i in range(0, 2*(max(X, Y)+1), 2):

        mn = min(mn, C*i+A*max(X-i//2, 0)+B*max(Y-i//2, 0))

    print((int(mn)))

    return





# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)

def main():

    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    A = int(next(tokens))  # type: int

    B = int(next(tokens))  # type: int

    C = int(next(tokens))  # type: int

    X = int(next(tokens))  # type: int

    Y = int(next(tokens))  # type: int

    solve(A, B, C, X, Y)



if __name__ == '__main__':

    main()

#!/usr/bin/env python3

import sys





def solve(A: int, B: int, C: int, X: int, Y: int):

    c = 0

    if (A + B < 2 * C):

        c += min(X, Y) * (A + B)

    else:

        c += min(X, Y) * 2 * C

    if X > Y:

        c += (X - Y) * min(A, 2 * C)

    else:

        c += (Y - X) * min(B, 2 * C)

    print(c)

    return





# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)

def main():

    def iterate_tokens():

        for line in sys.stdin:

            for word in line.split():

                yield word

    tokens = iterate_tokens()

    A = int(next(tokens))  # type: int

    B = int(next(tokens))  # type: int

    C = int(next(tokens))  # type: int

    X = int(next(tokens))  # type: int

    Y = int(next(tokens))  # type: int

    solve(A, B, C, X, Y)



if __name__ == '__main__':

    main()

#!/usr/bin/env python3
import sys, math, fractions, itertools


def solve(A: int, B: int, C: int, X: int, Y: int):
    mn = 1e9
    for i in range(0, 2 * (max(X, Y) + 1), 2):
        mn = min(mn, C * i + A * max(X - i // 2, 0) + B * max(Y - i // 2, 0))
    print((int(mn)))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(A, B, C, X, Y)


if __name__ == "__main__":
    main()

#!/usr/bin/env python3
import sys


def solve(A: int, B: int, C: int, X: int, Y: int):
    c = 0
    if A + B < 2 * C:
        c += min(X, Y) * (A + B)
    else:
        c += min(X, Y) * 2 * C
    if X > Y:
        c += (X - Y) * min(A, 2 * C)
    else:
        c += (Y - X) * min(B, 2 * C)
    print(c)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(A, B, C, X, Y)


if __name__ == "__main__":
    main()

-import sys, math, fractions, itertools +import sys -    mn = 1e9 -    for i in range(0, 2 * (max(X, Y) + 1), 2): -        mn = min(mn, C * i + A * max(X - i // 2, 0) + B * max(Y - i // 2, 0)) -    print((int(mn))) +    c = 0 +    if A + B < 2 * C: +        c += min(X, Y) * (A + B) +    else: +        c += min(X, Y) * 2 * C +    if X > Y: +        c += (X - Y) * min(A, 2 * C) +    else: +        c += (Y - X) * min(B, 2 * C) +    print(c) -# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template) +# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)