A box contains many candies.
If 3 candies are taken away, the rest can be shared evenly among 7 people.
If 6 are taken away, the rest can be shared evenly among 8 people.
If 3 candies are added, then the box can be shared evenly among 5 people.
What is the smallest number of candies in the box?