The lifespan of a hamster is 4 years less than that of a rabbit. The lifespan of a raccoon is 2 times that of the hamster. If the total lifespan of the animals is 24 years, calculate the longevity for the rabbit.