Doubling and halving

Doubling and halving