The ones with nuts that they ate was 40% of the box because 80% x .5 = 40%
The ones without nuts that they ate equaled 25% of the box because 50% x .5 = 25%
They ate 65% of the box because 40 + 25 = <<40+25=65>>65
They left 35% of the box because 100 - 65 = <<100-65=35>>35
The box had 80 chocolates because 28 / .35 = <<28/.35=80>>80
#### 80