UVA107 - The Cat in the Hat

trees, math, number of leaves and internal nodes.