def input():
    import sys
    return sys.stdin.readline().rstrip()


def main():
    import math
    import collections
    import itertools

    a, b, c, x, y = map(int, input().split())
    if a + b < 2 * c:
        print(a * x + b * y)
    else:
        # num_c = min(x, y)
        if x < y:
            if b < c:
                print(x * c * 2 + (y - x) * b)
            else:
                print(y * c * 2)
        else:
            if a < c:
                print(y * c * 2 + (x - y) * a)
            else:
                print(y * c * 2)
        
        



if __name__ == '__main__':
    main()