def main():
    a, b, c, x, y = map(int, input().split())

    ans = 0

    if  a + b > 2 * c:
        ans += 2 * c * min(x, y)
        min_num = min(x, y)
        x -= min_num
        y -= min_num
        if x != 0:
            ans += min(x * a, x * c * 2)
        elif y != 0:
            ans += min(y * a, y * c * 2)
    else:
        ans = x * a + y * b

    print(ans)

if __name__ == '__main__':
    main()