First find how many candy canes Andy gets from his teachers: 3 canes/teacher * 4 teachers = <<3*4=12>>12 canes
Then add the number of candy canes he gets from his parents: 12 canes + 2 canes = <<12+2=14>>14 canes
Then divide that number by 7 to find the number of canes he buys: 14 canes / 7 = <<14/7=2>>2 canes
Then add the number of candy canes he gets from each source to find the total number: 2 canes + 14 canes = <<2+14=16>>16 canes
Then divide the total number of candy canes by the number of candy canes it takes to get one cavity to find the number of cavities Andy gets: 16 canes / 4 canes/cavity = <<16/4=4>>4 cavities
#### 16