posted by Oliver .
A black snake lies at the base of an apple tree and a cat is climbing in the tree branches. The number of apples on the tree is four less than twice the tree's height. One year ago the the cat's age was one-third of his mother's current age. Two years from now twice the cat's mother's age will be four less than the current length of the snake. Three years from now the cat will be two-thirds as old as its mother is at that time. If the length of the snake is 2 more than the height of the tree, then how many apples are on the tree?