In a box of stones, the ratio of red marbles to total marbles is 2:5. The ratio of green stones to total stones is 3:10. If the stones that are neither red nor green are blue, how many blue stones are in the box if there are 40 marbles in the box?