def main():
    A,B,C,X,Y = map(int, input().split())
    if X >= Y:
        return min([A*X+B*Y, A*(X-Y)+C*Y*2, C*X*2])
    else:
        return min([A*X+B*Y, B*(Y-X)+C*Y*2, C*Y*2])


if __name__ == '__main__':
    print(main())

