Matthias has 40-30 = <<40-30=10>>10 soccer balls without holes.
Matthias has 15-7 = <<15-7=8>>8 basketballs without holes.
A total of 10+8 = <<10+8=18>>18 balls do not have holes.
#### 18