A bracelet has two colors of beads. The ratio of green beads to blue beads is 2:7. There are 18 green beads. How many beads are there in total?