A, B, C, X, Y = [int(x) for x in input().split()]

def main():
    if A + B <= 2 * C:
        ans = A * X + B * Y
    elif 2 * C <= min(A, B):
        ans = 2 * C * max(X, Y)
    else:
        c_type_base_num = min(X, Y)
        a_type_rest_num = X - c_type_base_num
        b_type_rest_num = Y - c_type_base_num
        ans = 2 * C * c_type_base_num + \
              A * a_type_rest_num + \
              B * b_type_rest_num
    print(ans)

if __name__ == "__main__":
    main()